1. 8.5.x core/lib/Drupal/Core/Entity/EntityHandlerInterface.php EntityHandlerInterface
  2. 8.0.x core/lib/Drupal/Core/Entity/EntityHandlerInterface.php EntityHandlerInterface
  3. 8.1.x core/lib/Drupal/Core/Entity/EntityHandlerInterface.php EntityHandlerInterface
  4. 8.2.x core/lib/Drupal/Core/Entity/EntityHandlerInterface.php EntityHandlerInterface
  5. 8.3.x core/lib/Drupal/Core/Entity/EntityHandlerInterface.php EntityHandlerInterface
  6. 8.4.x core/lib/Drupal/Core/Entity/EntityHandlerInterface.php EntityHandlerInterface
  7. 8.6.x core/lib/Drupal/Core/Entity/EntityHandlerInterface.php EntityHandlerInterface

Defines an interface for entity handlers.

This interface can be implemented by entity handlers that require dependency injection.

Hierarchy

Expanded class hierarchy of EntityHandlerInterface

All classes that implement EntityHandlerInterface

Related topics

10 files declare their use of EntityHandlerInterface
BlockAccessControlHandler.php in core/modules/block/src/BlockAccessControlHandler.php
ContentTranslationHandler.php in core/modules/content_translation/src/ContentTranslationHandler.php
DefaultHtmlRouteProvider.php in core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php
EntityModerationRouteProvider.php in core/modules/content_moderation/src/Entity/Routing/EntityModerationRouteProvider.php
EntityViewsData.php in core/modules/views/src/EntityViewsData.php

... See full list

File

core/lib/Drupal/Core/Entity/EntityHandlerInterface.php, line 15

Namespace

Drupal\Core\Entity
View source
interface EntityHandlerInterface {

  /**
   * Instantiates a new instance of this entity handler.
   *
   * 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 \Drupal\Core\Entity\EntityTypeInterface $entity_type
   *   The entity type definition.
   *
   * @return static
   *   A new instance of the entity handler.
   */
  public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type);

}

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description Overrides
EntityHandlerInterface::createInstance public static function Instantiates a new instance of this entity handler.