Element

implements Zend\Form\ElementAttributeRemovalInterface , Zend\Form\ElementInterface , Zend\Form\LabelAwareInterface , Zend\Stdlib\InitializableInterface

Known subclasses

Omeka\Form\ActivateForm, Omeka\Form\ConfirmForm, Omeka\Form\Element\AbstractGroupByOwnerSelect, Omeka\Form\Element\AbstractVocabularyMemberSelect, Omeka\Form\Element\Asset, Omeka\Form\Element\Ckeditor, Omeka\Form\Element\CkeditorInline, Omeka\Form\Element\ColorPicker, Omeka\Form\Element\HtmlTextarea, Omeka\Form\Element\ItemSetSelect, Omeka\Form\Element\PropertySelect, Omeka\Form\Element\Recaptcha, Omeka\Form\Element\ResourceClassSelect, Omeka\Form\Element\ResourceSelect, Omeka\Form\Element\RestoreTextarea, Omeka\Form\Element\SiteSelect, Omeka\Form\ForgotPasswordForm, Omeka\Form\InstallationForm, Omeka\Form\LoginForm, Omeka\Form\ModuleStateChangeForm, Omeka\Form\ResourceBatchUpdateForm, Omeka\Form\ResourceForm, Omeka\Form\ResourceTemplateForm, Omeka\Form\ResourceTemplateImportForm, Omeka\Form\ResourceTemplateReviewImportForm, Omeka\Form\SettingForm, Omeka\Form\SiteForm, Omeka\Form\SitePageForm, Omeka\Form\SiteSettingsForm, Omeka\Form\UserForm, Omeka\Form\VocabularyForm, Omeka\Form\VocabularyImportForm, Omeka\Form\VocabularyUpdateForm, Zend\Form\Element\Select, Zend\Form\Element\Text, Zend\Form\Element\Textarea, Zend\Form\Fieldset, Zend\Form\Form
Methods Summary
public
# __construct( null|int|string $name = NULL, array $options = array ( ) )
public
# init( )
This function is automatically called when creating element with factory. It allows to perform various operations (add elements. ..)

Implementation of

public
# setName( string $name )
Set value for name

Implementation of

public
# getName( )
Get value for name

Implementation of

public
# setOptions( array|\Traversable $options )
Set options for an element. Accepted options are: - label: label to associate with the element - label_attributes: attributes to use when the label is rendered - label_options: label specific options

Implementation of

public
# getOptions( )
Get defined options

Implementation of

public
# getOption( string $option )
Return the specified option

Implementation of

public
# setOption( string $key , mixed $value )
Set a single option for an element

Implementation of

public
# setAttribute( string $key , mixed $value )
Set a single element attribute

Implementation of

public
# getAttribute( $key )
Retrieve a single element attribute

Implementation of

public
# removeAttribute( string $key )
Remove a single attribute

Implementation of

public
# hasAttribute( string $key )
Does the element has a specific attribute ?

Implementation of

public
# setAttributes( array|\Traversable $arrayOrTraversable )
Set many attributes at once Implementation will decide if this will overwrite or merge.

Implementation of

public
# getAttributes( )
Retrieve all attributes at once

Implementation of

public
# removeAttributes( array $keys )
Remove many attributes at once

Implementation of

public
public
# setValue( mixed $value )
Set the element value

Implementation of

public
# getValue( )
Retrieve the element value

Implementation of

public
# setLabel( $label )
Set the label used for this element

Implementation of

public
# getLabel( )
Retrieve the label used for this element

Implementation of

public
# setLabelAttributes( array $labelAttributes )
Set the attributes to use with the label

Implementation of

public
# getLabelAttributes( )
Get the attributes to use with the label

Implementation of

public
# setLabelOptions( array|\Traversable $arrayOrTraversable )
Set many label options at once Implementation will decide if this will overwrite or merge.

Implementation of

public
# getLabelOptions( )
Get label specific options

Implementation of

public
# clearLabelOptions( )
Clear all label options

Implementation of

public
# removeLabelOptions( array $keys )
Remove many attributes at once

Implementation of

public
# setLabelOption( string $key , mixed $value )
Set a single label optionn

Implementation of

public
# getLabelOption( $key )
Retrieve a single label option

Implementation of

public
# removeLabelOption( string $key )
Remove a single label option

Implementation of

public
# hasLabelOption( string $key )
Does the element has a specific label option ?

Implementation of

public
# setMessages( array|\Traversable $messages )
Set a list of messages to report when validation fails

Implementation of

public
# getMessages( )
Get validation error messages, if any. Returns a list of validation failure messages, if any.

Implementation of

Properties Summary
protected array $attributes
# array ( )
protected null|string $label
# NULL
protected array $labelAttributes
# array ( )
protected array $labelOptions
Label specific options
# array ( )
protected array $messages
# array ( )
protected array $options
# array ( )
protected mixed $value
# NULL