protected function WebformEntityHandlersForm::updateHandlerWeights in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformEntityHandlersForm.php \Drupal\webform\WebformEntityHandlersForm::updateHandlerWeights()
Updates webform handler weights.
Parameters
array $handlers: Associative array with handlers having handler ids as keys and array with handler data as values.
1 call to WebformEntityHandlersForm::updateHandlerWeights()
- WebformEntityHandlersForm::submitForm in src/
WebformEntityHandlersForm.php - This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…
File
- src/
WebformEntityHandlersForm.php, line 254
Class
- WebformEntityHandlersForm
- Provides a webform to manage submission handlers.
Namespace
Drupal\webformCode
protected function updateHandlerWeights(array $handlers) {
foreach ($handlers as $handler_id => $handler_data) {
if ($this->entity
->getHandlers()
->has($handler_id)) {
$this->entity
->getHandler($handler_id)
->setWeight($handler_data['weight']);
}
}
}