interface EntityControllerInterface

Defines a common interface for entity controllers.

This interface can be implemented by entity controllers that require dependency injection. These are not controllers in the routing sense of the word, but instead are handlers that perform a specific function for an entity type.

Hierarchy

Expanded class hierarchy of EntityControllerInterface

All classes that implement EntityControllerInterface

7 files declare their use of EntityControllerInterface
ActionAddFormController.php in drupal/core/modules/action/lib/Drupal/action/ActionAddFormController.php
Contains \Drupal\action\ActionAddFormController.
ActionFormControllerBase.php in drupal/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
Contains Drupal\action\ActionEditFormController.
ActionListController.php in drupal/core/modules/action/lib/Drupal/action/ActionListController.php
Contains \Drupal\action\ActionListController.
MenuLinkFormController.php in drupal/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php
Contains \Drupal\menu_link\MenuLinkFormController.
ViewAddFormController.php in drupal/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php
Contains Drupal\views_ui\ViewAddFormController.

... See full list

File

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

Namespace

Drupal\Core\Entity
View source
interface EntityControllerInterface {

  /**
   * 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.
   *
   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
   *   The service container this object should use.
   * @param string $entity_type
   *   The entity type which the controller handles.
   * @param array $entity_info
   *   An array of entity info for the entity type.
   *
   * @return static
   *   A new instance of the entity controller.
   */
  public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info);

}

Members

Namesort descending Modifiers Type Description Overrides
EntityControllerInterface::createInstance public static function Instantiates a new instance of this entity controller. 8