Same name in this branch
- 10 core/lib/Drupal/Core/Render/Annotation/FormElement.php \Drupal\Core\Render\Annotation\FormElement
- 10 core/lib/Drupal/Core/Render/Element/FormElement.php \Drupal\Core\Render\Element\FormElement
- 10 core/lib/Drupal/Core/Render/Attribute/FormElement.php \Drupal\Core\Render\Attribute\FormElement
Same name and namespace in other branches
- 8.9.x core/lib/Drupal/Core/Render/Element/FormElement.php \Drupal\Core\Render\Element\FormElement
- 9 core/lib/Drupal/Core/Render/Element/FormElement.php \Drupal\Core\Render\Element\FormElement
Provides a base class for form element plugins.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\Core\Render\Element\RenderElementBase implements ElementInterface
- class \Drupal\Core\Render\Element\FormElementBase implements FormElementInterface
- class \Drupal\Core\Render\Element\FormElement
- class \Drupal\Core\Render\Element\FormElementBase implements FormElementInterface
- class \Drupal\Core\Render\Element\RenderElementBase implements ElementInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of FormElement
Deprecated
in drupal:10.3.0 and is removed from drupal:12.0.0. use \Drupal\Core\Render\Element\FormElementBase instead.
See also
https://www.drupal.org/node/3436275
1 file declares its use of FormElement
- DeprecatedExtendsFormElement.php in core/
modules/ system/ tests/ modules/ element_info_test/ src/ Element/ DeprecatedExtendsFormElement.php
File
- core/
lib/ Drupal/ Core/ Render/ Element/ FormElement.php, line 15
Namespace
Drupal\Core\Render\ElementView source
abstract class FormElement extends FormElementBase {
/**
* {@inheritdoc}
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
@trigger_error('\\Drupal\\Core\\Render\\Element\\FormElement is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use \\Drupal\\Core\\Render\\Element\\FormElementBase instead. See https://www.drupal.org/node/3436275', E_USER_DEPRECATED);
}
/**
* {@inheritdoc}
*/
public static function setAttributes(&$element, $class = []) {
@trigger_error('\\Drupal\\Core\\Render\\Element\\FormElement::setAttributes() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use \\Drupal\\Core\\Render\\Element\\FormElementBase::setAttributes() instead. See https://www.drupal.org/node/3436275', E_USER_DEPRECATED);
parent::setAttributes($element, $class);
}
/**
* {@inheritdoc}
*/
public static function preRenderGroup($element) {
@trigger_error('\\Drupal\\Core\\Render\\Element\\FormElement::preRenderGroup() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use \\Drupal\\Core\\Render\\Element\\FormElementBase::preRenderGroup() instead. See https://www.drupal.org/node/3436275', E_USER_DEPRECATED);
return parent::preRenderGroup($element);
}
/**
* {@inheritdoc}
*/
public static function processAjaxForm(&$element, FormStateInterface $form_state, &$complete_form) {
@trigger_error('\\Drupal\\Core\\Render\\Element\\FormElement::processAjaxForm() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use \\Drupal\\Core\\Render\\Element\\FormElementBase::processAjaxForm() instead. See https://www.drupal.org/node/3436275', E_USER_DEPRECATED);
return parent::processAjaxForm($element, $form_state, $complete_form);
}
/**
* {@inheritdoc}
*/
public static function preRenderAjaxForm($element) {
@trigger_error('\\Drupal\\Core\\Render\\Element\\FormElement::preRenderAjaxForm() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use \\Drupal\\Core\\Render\\Element\\FormElementBase::preRenderAjaxForm() instead. See https://www.drupal.org/node/3436275', E_USER_DEPRECATED);
return parent::preRenderAjaxForm($element);
}
/**
* {@inheritdoc}
*/
public static function processGroup(&$element, FormStateInterface $form_state, &$complete_form) {
@trigger_error('\\Drupal\\Core\\Render\\Element\\FormElement::processGroup() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use \\Drupal\\Core\\Render\\Element\\FormElementBase::processGroup() instead. See https://www.drupal.org/node/3436275', E_USER_DEPRECATED);
return parent::processGroup($element, $form_state, $complete_form);
}
/**
* {@inheritdoc}
*/
public static function valueCallback(&$element, $input, FormStateInterface $form_state) {
@trigger_error('\\Drupal\\Core\\Render\\Element\\FormElement::valueCallback() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use \\Drupal\\Core\\Render\\Element\\FormElementBase::valueCallback() instead. See https://www.drupal.org/node/3436275', E_USER_DEPRECATED);
return parent::valueCallback($element, $input, $form_state);
}
/**
* {@inheritdoc}
*/
public static function processPattern(&$element, FormStateInterface $form_state, &$complete_form) {
@trigger_error('\\Drupal\\Core\\Render\\Element\\FormElement::processPattern() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use \\Drupal\\Core\\Render\\Element\\FormElementBase::processPattern() instead. See https://www.drupal.org/node/3436275', E_USER_DEPRECATED);
return parent::processPattern($element, $form_state, $complete_form);
}
/**
* {@inheritdoc}
*/
public static function validatePattern(&$element, FormStateInterface $form_state, &$complete_form) {
@trigger_error('\\Drupal\\Core\\Render\\Element\\FormElement::validatePattern() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use \\Drupal\\Core\\Render\\Element\\FormElementBase::validatePattern() instead. See https://www.drupal.org/node/3436275', E_USER_DEPRECATED);
parent::validatePattern($element, $form_state, $complete_form);
}
/**
* {@inheritdoc}
*/
public static function processAutocomplete(&$element, FormStateInterface $form_state, &$complete_form) {
@trigger_error('\\Drupal\\Core\\Render\\Element\\FormElement::processAutocomplete() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use \\Drupal\\Core\\Render\\Element\\FormElementBase::processAutocomplete() instead. See https://www.drupal.org/node/3436275', E_USER_DEPRECATED);
return parent::processAutocomplete($element, $form_state, $complete_form);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
public | function | 2 | |
DependencySerializationTrait:: |
public | function | 2 | |
DependencySerializationTrait:: |
protected | property | ||
DependencySerializationTrait:: |
protected | property | ||
FormElement:: |
public static | function |
#element_validate callback for #pattern form element property. Overrides FormElementBase:: |
|
FormElement:: |
public static | function |
#process callback for #pattern form element property. Overrides FormElementBase:: |
|
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
FormElement:: |
public static | function |
Adds Ajax information about an element to communicate with JavaScript. Overrides RenderElementBase:: |
|
FormElement:: |
public static | function |
Adds autocomplete functionality to elements. Overrides FormElementBase:: |
|
FormElement:: |
public static | function |
Adds members of this group as actual elements for rendering. Overrides RenderElementBase:: |
|
FormElement:: |
public static | function |
Arranges elements into groups. Overrides RenderElementBase:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
FormElement:: |
public | function |
Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
|
FormElement:: |
public static | function |
Determines how user input is mapped to an element's #value property. Overrides FormElementBase:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
FormElement:: |
public static | function |
Form element processing handler for the #ajax form property. Overrides RenderElementBase:: |
|
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
1 |
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
MessengerTrait:: |
public | function | Gets the messenger. | 8 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
ElementInterface:: |
public | function | Returns the element properties for this element. | 59 |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
FormElement:: |
public static | function |
Sets a form element's class attribute. Overrides RenderElementBase:: |
|
MessengerTrait:: |
public | function | Sets the messenger. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 1 |
MessengerTrait:: |
protected | property | The messenger. | 8 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 3 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |