You are here

public function Render::renderForm in Bamboo Twig 8.3

Same name and namespace in other branches
  1. 8.5 bamboo_twig_loader/src/TwigExtension/Render.php \Drupal\bamboo_twig_loader\TwigExtension\Render::renderForm()
  2. 8.2 bamboo_twig_loader/src/TwigExtension/Render.php \Drupal\bamboo_twig_loader\TwigExtension\Render::renderForm()
  3. 8.4 bamboo_twig_loader/src/TwigExtension/Render.php \Drupal\bamboo_twig_loader\TwigExtension\Render::renderForm()

Load a given form with or whitout parameters.

Parameters

string $module: The module name where the form below.

string $form: The form class name.

array $params: (optional) An array of parameters passed to the form.

Return value

null|array A render array for the form or NULL if the form does not exist.

File

bamboo_twig_loader/src/TwigExtension/Render.php, line 67

Class

Render
Provides some renderer as Twig Extensions.

Namespace

Drupal\bamboo_twig_loader\TwigExtension

Code

public function renderForm($module, $form, array $params = []) {
  return $this
    ->getFormBuilder()
    ->getForm('Drupal\\' . $module . '\\Form\\' . $form, $params);
}