You are here

class MultiformExampleController in Multiple forms 8

Controller routines for contact routes.

Hierarchy

Expanded class hierarchy of MultiformExampleController

File

multiform_example/src/Controller/MultiformExampleController.php, line 16
Contains \Drupal\multiform_example\Controller\MainController.

Namespace

Drupal\multiform_example\Controller
View source
class MultiformExampleController implements ContainerInjectionInterface {
  protected $multiFormBuilder;
  public function __construct(MultiFormBuilder $formBuilder) {
    $this->multiFormBuilder = $formBuilder;
  }

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container) {
    return new static($container
      ->get('multiform.form_builder'));
  }

  /**
   * {@inheritdoc}
   */
  public function content() {
    return $this->multiFormBuilder
      ->getForm(array(
      'Drupal\\multiform_example\\Form\\Example1',
    ), array(
      'Drupal\\multiform_example\\Form\\Example2',
    ));
  }

}

Members