protected function YamlFormEntityHandlersForm::updateHandlerWeights in YAML Form 8
Updates form handler weights.
Parameters
array $handlers: Associative array with handlers having handler ids as keys and array with handler data as values.
1 call to YamlFormEntityHandlersForm::updateHandlerWeights()
- YamlFormEntityHandlersForm::submitForm in src/
YamlFormEntityHandlersForm.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/
YamlFormEntityHandlersForm.php, line 188
Class
- YamlFormEntityHandlersForm
- Provides a form to manage submission handlers.
Namespace
Drupal\yamlformCode
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']);
}
}
}