You are here

interface EntityTraversalContainerInjectionInterface in General Data Protection Regulation 3.0.x

Same name and namespace in other branches
  1. 8.2 modules/gdpr_fields/src/EntityTraversalContainerInjectionInterface.php \Drupal\gdpr_fields\EntityTraversalContainerInjectionInterface
  2. 8 modules/gdpr_fields/src/EntityTraversalContainerInjectionInterface.php \Drupal\gdpr_fields\EntityTraversalContainerInjectionInterface

Defines a common interface for dependency container injection.

This interface gives classes who need services a factory method for instantiation as well as the entity to be traversed.

Hierarchy

Expanded class hierarchy of EntityTraversalContainerInjectionInterface

All classes that implement EntityTraversalContainerInjectionInterface

File

modules/gdpr_fields/src/EntityTraversalContainerInjectionInterface.php, line 14

Namespace

Drupal\gdpr_fields
View source
interface EntityTraversalContainerInjectionInterface {

  /**
   * Creates an instance of the traversal for this specific entity.
   *
   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
   *   The service container this instance should use.
   * @param \Drupal\Core\Entity\EntityInterface $base_entity
   *   The entity to be traversed.
   */
  public static function create(ContainerInterface $container, EntityInterface $base_entity);

}

Members

Namesort descending Modifiers Type Description Overrides
EntityTraversalContainerInjectionInterface::create public static function Creates an instance of the traversal for this specific entity. 1