public static function EntityControllerInterface::createInstance

Instantiates a new instance of this entity controller.

This is a factory method that returns a new instance of this object. The factory should pass any needed dependencies into the constructor of this object, but not the container itself. Every call to this method must return a new instance of this object; that is, it may not implement a singleton.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The service container this object should use.

string $entity_type: The entity type which the controller handles.

array $entity_info: An array of entity info for the entity type.

Return value

static A new instance of the entity controller.

8 methods override EntityControllerInterface::createInstance()
ActionFormControllerBase::createInstance in drupal/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
Instantiates a new instance of this entity controller.
ConfigStorageController::createInstance in drupal/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
Instantiates a new instance of this entity controller.
DatabaseStorageController::createInstance in drupal/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
Instantiates a new instance of this entity controller.
EntityListController::createInstance in drupal/core/lib/Drupal/Core/Entity/EntityListController.php
Instantiates a new instance of this entity controller.
MenuLinkFormController::createInstance in drupal/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php
Instantiates a new instance of this entity controller.

... See full list

File

drupal/core/lib/Drupal/Core/Entity/EntityControllerInterface.php, line 41
Contains \Drupal\Core\Entity\EntityControllerInterface.

Class

EntityControllerInterface
Defines a common interface for entity controllers.

Namespace

Drupal\Core\Entity

Code

public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info);