Upgraded drupal core with security updates
[yaffs-website] / web / core / lib / Drupal / Core / Field / BaseFieldOverrideStorage.php
1 <?php
2
3 namespace Drupal\Core\Field;
4
5 use Drupal\Core\Entity\EntityTypeInterface;
6 use Drupal\Core\Language\LanguageManagerInterface;
7 use Symfony\Component\DependencyInjection\ContainerInterface;
8 use Drupal\Core\Config\ConfigFactoryInterface;
9 use Drupal\Component\Uuid\UuidInterface;
10
11 /**
12  * Storage class for base field overrides.
13  */
14 class BaseFieldOverrideStorage extends FieldConfigStorageBase {
15
16   /**
17    * Constructs a BaseFieldOverrideStorage object.
18    *
19    * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
20    *   The entity type definition.
21    * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
22    *   The config factory service.
23    * @param \Drupal\Component\Uuid\UuidInterface $uuid_service
24    *   The UUID service.
25    * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
26    *   The language manager.
27    * @param \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager
28    *   The field type plugin manager.
29    */
30   public function __construct(EntityTypeInterface $entity_type, ConfigFactoryInterface $config_factory, UuidInterface $uuid_service, LanguageManagerInterface $language_manager, FieldTypePluginManagerInterface $field_type_manager) {
31     parent::__construct($entity_type, $config_factory, $uuid_service, $language_manager);
32     $this->fieldTypeManager = $field_type_manager;
33   }
34
35   /**
36    * {@inheritdoc}
37    */
38   public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
39     return new static(
40       $entity_type,
41       $container->get('config.factory'),
42       $container->get('uuid'),
43       $container->get('language_manager'),
44       $container->get('plugin.manager.field.field_type')
45     );
46   }
47
48 }