function ComponentElement::valueCallback
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Render/Element/ComponentElement.php \Drupal\Core\Render\Element\ComponentElement::valueCallback()
Returns NULL to let the Form API fall back to #default_value or #value. Components delegate actual value rendering to the Twig template via the form_state prop, so no server-side value transformation is needed here.
Parameters
array $element: An associative array containing the properties of the element.
mixed $input: The incoming input to populate the form element. If this is FALSE, the element's default value should be returned.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
mixed The value to assign to the element.
Overrides FormElementInterface::valueCallback
File
-
core/
lib/ Drupal/ Core/ Render/ Element/ ComponentElement.php, line 205
Class
- ComponentElement
- Provides a Single-Directory Component render element.
Namespace
Drupal\Core\Render\ElementCode
public static function valueCallback(&$element, $input, FormStateInterface $form_state) {
return NULL;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.