Omeka_Form¶
Package: Form
- class Omeka_Form¶
extends Zend_Form
A Zend_Form subclass that sets up forms to be properly displayed in Omeka.
- property Omeka_Form::$_defaultDisplayGroupClass¶
protected string
Class name of Omeka DisplayGroup subclass.
- property Omeka_Form::$_autoApplyOmekaStyles¶
protected boolean
Whether or not to automatically apply Omeka-specific decorators and styling information to form elements prior to rendering.
- Omeka_Form::init()¶
Set up Omeka-specific form elements and decorators.
Returns: void
- Omeka_Form::loadDefaultDecorators()¶
Set up base form decorators.
Returns: void
- Omeka_Form::getDefaultElementDecorators()¶
Return default decorators for form elements.
Makes form output conform to Omeka conventions.
Returns: array
- Omeka_Form::applyOmekaStyles()¶
Configure element styles / decorators based on the type of element.
This may be called after elements to the form, as the decorator configuration in init() runs before elements can be added.
Returns: void
- Omeka_Form::getMessagesAsString($messageDelimiter = ' ', $elementDelimiter = ', ')¶
Retrieve all of the form error messages as a nicely formatted string.
Useful for displaying all form errors at the top of a form, or for flashing form errors after redirects.
Parameters:
- $messageDelimiter (string) – The string to display between different error messages for an element.
- $elementDelimiter (string) – The string to display between different elements.
Returns: string
- Omeka_Form::setAutoApplyOmekaStyles($flag)¶
Specify whether or not to automatically apply Omeka-specific decorators and styles prior to rendering the form.
Parameters:
- $flag (mixed) – A boolean or boolean-equivalent.
Returns: void
- Omeka_Form::render(Zend_View_Interface $view = null)¶
Apply Omeka default styles (if requested) just before rendering.
Parameters:
- $view (Zend_View_Interface) –
Returns: string
- Omeka_Form::_addClassNameToElement(Zend_Form_Element $element, $className)¶
Add a specific class name to an element.
Parameters:
- $element (Zend_Form_Element) –
- $className (string) –
Returns: void