Drupal 8  8.0.2
FormElementInterface Interface Reference
Inheritance diagram for FormElementInterface:

Static Public Member Functions

static valueCallback (&$element, $input, FormStateInterface $form_state)
 
- Static Public Member Functions inherited from ElementInterface
static setAttributes (&$element, $class=array())
 

Additional Inherited Members

- Public Member Functions inherited from ElementInterface
 getInfo ()
 
- Public Member Functions inherited from PluginInspectionInterface
 getPluginId ()
 
 getPluginDefinition ()
 

Detailed Description

Provides an interface for form element plugins.

Form element plugins are a subset of render elements, specifically representing HTML elements that take input as part of a form. Form element plugins are discovered via the same mechanism as regular render element plugins. See for general information about render element plugins.

See Also
Plugin API

Member Function Documentation

static valueCallback ( $element,
  $input,
FormStateInterface  $form_state 
)
static

Determines how user input is mapped to an element's #value property.

Parameters
array$elementAn associative array containing the properties of the element.
mixed$inputThe incoming input to populate the form element. If this is FALSE, the element's default value should be returned.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
Returns
mixed The value to assign to the element.

Implemented in Select, MachineName, Checkboxes, Table, Radios, FormElement, Textfield, Datetime, Password, Range, Textarea, Tableselect, EntityAutocomplete, Checkbox, PathElement, Datelist, PasswordConfirm, Token, and ImageButton.


The documentation for this interface was generated from the following file: