Omeka_Form

class Omeka_Form

Package: Form

A Zend_Form subclass that sets up forms to be properly displayed in Omeka.

property _defaultDisplayGroupClass

Class name of Omeka DisplayGroup subclass.

property _autoApplyOmekaStyles

Whether or not to automatically apply Omeka-specific decorators and styling information to form elements prior to rendering.

init()

Set up Omeka-specific form elements and decorators.

Returns:void
loadDefaultDecorators()

Set up base form decorators.

Returns:void
getDefaultElementDecorators()

Return default decorators for form elements.

Makes form output conform to Omeka conventions.

Returns:array
applyOmekaStyles()

Configure element styles / decorators based on the type of element.

This may be called after elements to the form, as the decoratorconfiguration in init() runs before elements can be added.

Returns:void
getMessagesAsString(string $messageDelimiter =, string $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 flashingform 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

setAutoApplyOmekaStyles(mixed $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

render(Zend_View_Interface $view)

Apply Omeka default styles (if requested) just before rendering.

Parameters:
  • $view (Zend_View_Interface) –
Returns:

string

_addClassNameToElement(Zend_Form_Element $element, string $className)

Add a specific class name to an element.

Parameters:
  • $element (Zend_Form_Element) –
  • $className (string) –
Returns:

void

Project Versions

Previous topic

Omeka_Db

Next topic

Omeka_Navigation

This Page