protected function ControllerBase::entityFormBuilder

protected ControllerBase::entityFormBuilder()

Retrieves the entity form builder.

Return value

\Drupal\Core\Entity\EntityFormBuilderInterface The entity form builder.

File

core/lib/Drupal/Core/Controller/ControllerBase.php, line 160

Class

ControllerBase
Utility base class for thin controllers.

Namespace

Drupal\Core\Controller

Code

protected function entityFormBuilder() {
  if (!$this->entityFormBuilder) {
    $this->entityFormBuilder = $this->container()->get('entity.form_builder');
  }
  return $this->entityFormBuilder;
}

© 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!Controller!ControllerBase.php/function/ControllerBase::entityFormBuilder/8.1.x