public static function ConfigStorageController::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.

Overrides EntityControllerInterface::createInstance

2 methods override ConfigStorageController::createInstance()
FieldInstanceStorageController::createInstance in drupal/core/modules/field/lib/Drupal/field/FieldInstanceStorageController.php
Instantiates a new instance of this entity controller.
FieldStorageController::createInstance in drupal/core/modules/field/lib/Drupal/field/FieldStorageController.php
Instantiates a new instance of this entity controller.

File

drupal/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php, line 95
Definition of Drupal\Core\Config\Entity\ConfigStorageController.

Class

ConfigStorageController
Defines the storage controller class for configuration entities.

Namespace

Drupal\Core\Config\Entity

Code

public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) {
  return new static($entity_type, $entity_info, $container
    ->get('config.factory'), $container
    ->get('config.storage'));
}