Omeka_Form_Admin

class Omeka_Form_Admin

Package: Form

A Zend_Form subclass to set up a record editing form for the Omeka 2.0 admin user interface

property _editDisplayGroup
property _saveDisplayGroup
property _saveDisplayGroupActionDecorator
property _record
property _type
property _hasPublicPage
property _editGroupCssClass
property _saveGroupCssClass
init()
addElementToEditGroup(Zend_Form_Element|string $element, string|null $name, array|null $options)

Add an element to the edit area

Parameters:
  • $element (Zend_Form_Element|string) –
  • $name (string|null) –
  • $options (array|null) –
addElementToSaveGroup(Zend_Form_Element|string $element, string|null $name, array|null $options)

Add an element to the save panel

Parameters:
  • $element (Zend_Form_Element|string) –
  • $name (string|null) –
  • $options (array|null) –
addElementToDisplayGroup(string $group, Zend_Form_Element $element, string $name, array $options)

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 passparameters 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

getSaveGroupDefaultElementDecorators()

Get the decorators for the save display group

Returns:array The default decorators for the save display group
setEditGroupCssClass(string $cssClass)

Set the class for the edit display group.

You can alter the default css class for the edit group panel by passing in anoption 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 toexisting admin theme look and feel

Parameters:
  • $cssClass (string) –
setSaveGroupCssClass(string $cssClass)

Set the class for the save display group.

You can alter the default css class for the save group panel by passing in anoption 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 toexisting admin theme look and feel

Parameters:
  • $cssClass (string) –
setType(string $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) –
setRecord(Omeka_Record_AbstractRecord $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 formwill automatically add ‘Edit’ and ‘Delete’ buttons to the save panel

Parameters:
setHasPublicPage(bool $value =)

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