public function Webform::invokeElements in Webform 8.5
Same name and namespace in other branches
- 6.x src/Entity/Webform.php \Drupal\webform\Entity\Webform::invokeElements()
Invoke elements method.
Parameters
string $method: The handler method to be invoked.
mixed $data: The argument to passed by reference to the handler method.
mixed $context1: (optional) An additional variable that is passed by reference.
mixed $context2: (optional) An additional variable that is passed by reference.
Overrides WebformInterface::invokeElements
File
- src/
Entity/ Webform.php, line 2797
Class
- Webform
- Defines the webform entity.
Namespace
Drupal\webform\EntityCode
public function invokeElements($method, &$data, &$context1 = NULL, &$context2 = NULL) {
/** @var \Drupal\webform\Plugin\WebformElementManagerInterface $element_manager */
$element_manager = \Drupal::service('plugin.manager.webform.element');
$elements = $this
->getElementsInitializedAndFlattened();
foreach ($elements as $element) {
$element_manager
->invokeMethod($method, $element, $data, $context1, $context2);
}
}