Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Entity / EntityHandlerInterface.php
1 <?php
2
3 namespace Drupal\Core\Entity;
4
5 use Symfony\Component\DependencyInjection\ContainerInterface;
6
7 /**
8  * Defines an interface for entity handlers.
9  *
10  * This interface can be implemented by entity handlers that require
11  * dependency injection.
12  *
13  * @ingroup entity_api
14  */
15 interface EntityHandlerInterface {
16
17   /**
18    * Instantiates a new instance of this entity handler.
19    *
20    * This is a factory method that returns a new instance of this object. The
21    * factory should pass any needed dependencies into the constructor of this
22    * object, but not the container itself. Every call to this method must return
23    * a new instance of this object; that is, it may not implement a singleton.
24    *
25    * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
26    *   The service container this object should use.
27    * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
28    *   The entity type definition.
29    *
30    * @return static
31    *   A new instance of the entity handler.
32    */
33   public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type);
34
35 }