protected EntityForm::prepareInvokeAll($hook, FormStateInterface $form_state)
Invokes the specified prepare hook variant.
string $hook: The hook variant name.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
protected function prepareInvokeAll($hook, FormStateInterface $form_state) { $implementations = $this->moduleHandler->getImplementations($hook); foreach ($implementations as $module) { $function = $module . '_' . $hook; if (function_exists($function)) { // Ensure we pass an updated translation object and form display at // each invocation, since they depend on form state which is alterable. $args = array($this->entity, $this->operation, &$form_state); call_user_func_array($function, $args); } } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityForm.php/function/EntityForm::prepareInvokeAll/8.1.x