1 | <?php |
||
17 | abstract class EntityFieldDeriverBase extends DeriverBase implements ContainerDeriverInterface { |
||
18 | |||
19 | /** |
||
20 | * Provides plugin definition values from fields. |
||
21 | * |
||
22 | * @param string $entityTypeId |
||
23 | * The host entity type. |
||
24 | * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $fieldDefinition |
||
25 | * Field definition object. |
||
26 | * @param array $basePluginDefinition |
||
27 | * Base definition array. |
||
28 | */ |
||
29 | abstract protected function getDerivativeDefinitionsFromFieldDefinition($entityTypeId, FieldStorageDefinitionInterface $fieldDefinition, array $basePluginDefinition); |
||
30 | |||
31 | /** |
||
32 | * The entity type manager. |
||
33 | * |
||
34 | * @var \Drupal\Core\Entity\EntityTypeManagerInterface |
||
35 | */ |
||
36 | protected $entityTypeManager; |
||
37 | |||
38 | /** |
||
39 | * The entity field manager. |
||
40 | * |
||
41 | * @var \Drupal\Core\Entity\EntityFieldManagerInterface |
||
42 | */ |
||
43 | protected $entityFieldManager; |
||
44 | |||
45 | /** |
||
46 | * The entity bundle info. |
||
47 | * |
||
48 | * @var \Drupal\Core\Entity\EntityTypeBundleInfoInterface |
||
49 | */ |
||
50 | protected $entityBundleInfo; |
||
51 | |||
52 | /** |
||
53 | * The base plugin id. |
||
54 | * |
||
55 | * @var string |
||
56 | */ |
||
57 | protected $basePluginId; |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public static function create(ContainerInterface $container, $basePluginId) { |
||
70 | |||
71 | /** |
||
72 | * RawValueFieldItemDeriver constructor. |
||
73 | * |
||
74 | * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager |
||
75 | * The entity type manager. |
||
76 | * @param \Drupal\Core\Entity\EntityFieldManagerInterface $entityFieldManager |
||
77 | * The entity field manager. |
||
78 | * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entityTypeBundleInfo |
||
79 | * The bundle info service. |
||
80 | * @param string $basePluginId |
||
81 | * The base plugin id. |
||
82 | */ |
||
83 | public function __construct( |
||
94 | |||
95 | /** |
||
96 | * {@inheritdoc} |
||
97 | */ |
||
98 | public function getDerivativeDefinitions($basePluginDefinition) { |
||
116 | |||
117 | /** |
||
118 | * Tells if given field has just a single property. |
||
119 | * |
||
120 | * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $definition |
||
121 | * Field definition. |
||
122 | * |
||
123 | * @return bool |
||
124 | */ |
||
125 | protected function isSinglePropertyField(FieldStorageDefinitionInterface $definition) { |
||
129 | |||
130 | } |
||
131 |