public function WebformElementManager::processElement in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElementManager.php \Drupal\webform\Plugin\WebformElementManager::processElement()
Process a form element and apply webform element specific enhancements.
This method allows any form API element to be enhanced using webform specific features include custom validation, external libraries, accessibility improvements, etc…
Parameters
array $element: An associative array containing an element with a #type property.
Return value
array The processed form element with webform element specific enhancements.
Overrides WebformElementManagerInterface::processElement
1 call to WebformElementManager::processElement()
- WebformElementManager::processElements in src/
Plugin/ WebformElementManager.php - Process form elements and apply webform element specific enhancements.
File
- src/
Plugin/ WebformElementManager.php, line 195
Class
- WebformElementManager
- Provides a plugin manager for webform element plugins.
Namespace
Drupal\webform\PluginCode
public function processElement(array &$element) {
$element_plugin = $this
->getElementInstance($element);
$element_plugin
->initialize($element);
$element_plugin
->prepare($element);
$element_plugin
->finalize($element);
$element_plugin
->setDefaultValue($element);
return $element;
}