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