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