interface FormElementInterface in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Render/Element/FormElementInterface.php \Drupal\Core\Render\Element\FormElementInterface
- 10 core/lib/Drupal/Core/Render/Element/FormElementInterface.php \Drupal\Core\Render\Element\FormElementInterface
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 \Drupal\Core\Render\Element\ElementInterface for general information about render element plugins.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Core\Render\Element\RenderCallbackInterface
- interface \Drupal\Core\Render\Element\ElementInterface
- interface \Drupal\Core\Render\Element\FormElementInterface
- interface \Drupal\Core\Render\Element\ElementInterface
Expanded class hierarchy of FormElementInterface
All classes that implement FormElementInterface
See also
\Drupal\Core\Render\ElementInfoManager
\Drupal\Core\Render\Element\FormElement
\Drupal\Core\Render\Annotation\FormElement
Related topics
1 file declares its use of FormElementInterface
- ElementInfoManager.php in core/
lib/ Drupal/ Core/ Render/ ElementInfoManager.php
File
- core/
lib/ Drupal/ Core/ Render/ Element/ FormElementInterface.php, line 23
Namespace
Drupal\Core\Render\ElementView source
interface FormElementInterface extends ElementInterface {
/**
* Determines how user input is mapped to an element's #value property.
*
* @param array $element
* An associative array containing the properties of the element.
* @param mixed $input
* The incoming input to populate the form element. If this is FALSE,
* the element's default value should be returned.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @return mixed
* The value to assign to the element.
*/
public static function valueCallback(&$element, $input, FormStateInterface $form_state);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ElementInterface:: |
public | function | Returns the element properties for this element. | 56 |
ElementInterface:: |
public static | function | Sets a form element's class attribute. | 1 |
FormElementInterface:: |
public static | function | Determines how user input is mapped to an element's #value property. | 1 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |