Browse Source

Issue #2880398 by mChadwick29: Code cleanup.

8.x-1.x 8.x-1.8
Chi 7 years ago
parent
commit
baa7e5ef84
  1. 8
      src/TwigExtension.php

8
src/TwigExtension.php

@ -222,16 +222,16 @@ class TwigExtension extends \Twig_Extension {
*
* @param string $form_id
* The form ID.
* @param ...
* Additional arguments are passed to form constructor.
*
* @return array
* A render array to represent the form.
*/
public function drupalForm($form_id) {
$form_builder = \Drupal::formBuilder();
$args = func_get_args();
// Enforcing the $form_id is always the first argument.
$args[0] = $form_id;
$formBuilder = \Drupal::formBuilder();
return call_user_func_array(array($formBuilder, 'getForm'), $args);
return call_user_func_array([$form_builder, 'getForm'], $args);
}
/**

Loading…
Cancel
Save