Omeka_Form_Admin
Package: Form
- class Omeka_Form_Admin
extends Omeka_Form
A Zend_Form subclass to set up a record editing form for the Omeka 2.0 admin user interface
- property Omeka_Form_Admin::$_editDisplayGroup
protected
- property Omeka_Form_Admin::$_saveDisplayGroup
protected
- property Omeka_Form_Admin::$_saveDisplayGroupActionDecorator
protected
- property Omeka_Form_Admin::$_record
protected
- property Omeka_Form_Admin::$_type
protected
- property Omeka_Form_Admin::$_hasPublicPage
protected
- property Omeka_Form_Admin::$_editGroupCssClass
protected
- property Omeka_Form_Admin::$_saveGroupCssClass
protected
- Omeka_Form_Admin::init()
- Omeka_Form_Admin::addElementToEditGroup($element, $name, $options = null)
Add an element to the edit area
- Parameters:
$element (
Zend_Form_Element|string
) –$name (
string|null
) –$options (
array|null
) –
- Omeka_Form_Admin::addElementToSaveGroup($element, $name = null, $options = null)
Add an element to the save panel
- Parameters:
$element (
Zend_Form_Element|string
) –$name (
string|null
) –$options (
array|null
) –
- Omeka_Form_Admin::addElementToDisplayGroup($group, $element, $name = null, $options = null)
Generalizes creating and adding new elements to one of the display groups
You can pass in either an Zend_Form_Element you have already created, or pass parameters as you would to Zend_Form::addElement
- Parameters:
$group (
string
) – Either ‘save’ or ‘edit’$element (
Zend_Form_Element
) – The element to add to the display group$name (
string
) –$options (
array
) –- Returns:
Omeka_Form_Admin
- Omeka_Form_Admin::getSaveGroupDefaultElementDecorators()
Get the decorators for the save display group
- Returns:
array The default decorators for the save display group
- Omeka_Form_Admin::setEditGroupCssClass($cssClass)
Set the class for the edit display group.
You can alter the default css class for the edit group panel by passing in an option for ‘editGroupCssClass’ when you create an instance of Omeka_Form_Admin. This should be done very sparingly, as the default class is the best match to existing admin theme look and feel
- Parameters:
$cssClass (
string
) –
- Omeka_Form_Admin::setSaveGroupCssClass($cssClass)
Set the class for the save display group.
You can alter the default css class for the save group panel by passing in an option for ‘editGroupCssClass’ when you create an instance of Omeka_Form_Admin. This should be done very sparingly, as the default class is the best match to existing admin theme look and feel
- Parameters:
$cssClass (
string
) –
- Omeka_Form_Admin::setType($type)
Set the record type of the object being edited (e.g., ‘item’)
Pass in the recordType as part of the options array when you create an instance
- Parameters:
$type (
string
) –
- Omeka_Form_Admin::setRecord($record)
Set the record (if one exists) for the object being edited
Passing the record object as part of the options when you create the form will automatically add ‘Edit’ and ‘Delete’ buttons to the save panel
- Parameters:
$record (
Omeka_Record_AbstractRecord
) –
- Omeka_Form_Admin::setHasPublicPage($value = false)
Set whether the save panel should display a link to the record’s public page if it exists
By default, a link to a record’s public page is available if it exists. Pass false as the value of hasPublicPage in the options array to suppress this behavior.
- Parameters:
$value (
bool
) – true