Omeka_View_Helper_ElementForm

Package: View\Helper

class Omeka_View_Helper_ElementForm

extends Zend_View_Helper_Abstract

Generate the form markup for entering element text metadata.

property Omeka_View_Helper_ElementForm::$_element

protected Element

Displays a form for the record’s element.

The function applies filters that allow plugins to customize the display of element form components. Here is an example of how a plugin may add and implement an element form filter:

add_filter(array(‘ElementForm’, ‘Item’, ‘Dublin Core’, ‘Title’)), ‘form_item_title’); function form_item_title(array $components, $args) {

// Where $components would looks like: // array( // ‘label’ => […], // ‘inputs’ => […], // ‘description’ => […], // ‘comment’ => […], // ‘add_input’ => […], // ) // and $args looks like: // array( // ‘record’ => […], // ‘element’ => […], // ‘options’ => […], // ) }

property Omeka_View_Helper_ElementForm::$_record

protected

Omeka_View_Helper_ElementForm::elementForm(Element $element, Omeka_Record_AbstractRecord $record, $options = array())
Parameters:
Omeka_View_Helper_ElementForm::_getFieldLabel()
Omeka_View_Helper_ElementForm::_getFieldDescription()
Omeka_View_Helper_ElementForm::_getFieldComment()
Omeka_View_Helper_ElementForm::_isPosted()
Omeka_View_Helper_ElementForm::_getPostArray()
Omeka_View_Helper_ElementForm::_getFormFieldCount()

How many form inputs to display for a given element.

Returns:int
Omeka_View_Helper_ElementForm::_getPostValueForField($index)
Parameters:
  • $index
Returns:

mixed

Omeka_View_Helper_ElementForm::_getHtmlFlagForField($index)
Parameters:
  • $index
Omeka_View_Helper_ElementForm::_getValueForField($index)

Retrieve the form value for the field.

Parameters:
  • $index
Returns:

string

Omeka_View_Helper_ElementForm::getElementTexts($index = null)

If index is not given, return all texts.

Parameters:
  • $index
Omeka_View_Helper_ElementForm::_getInputsComponent($extraFieldCount = null)
Parameters:
  • $extraFieldCount
Omeka_View_Helper_ElementForm::_getDescriptionComponent()
Omeka_View_Helper_ElementForm::_getCommentComponent()
Omeka_View_Helper_ElementForm::_getLabelComponent()