Conditions | 3 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | protected function getDerivativeDefinitionsFromFieldDefinition( |
||
15 | $entityTypeId, |
||
16 | FieldStorageDefinitionInterface $fieldDefinition, |
||
17 | array $basePluginDefinition |
||
18 | ) { |
||
19 | |||
20 | $derivatives = []; |
||
21 | |||
22 | if (isset($basePluginDefinition['field_types']) && in_array($fieldDefinition->getType(), $basePluginDefinition['field_types'])) { |
||
23 | $fieldName = $fieldDefinition->getName(); |
||
24 | $derivatives["$entityTypeId-$fieldName-" . $basePluginDefinition['id']] = [ |
||
25 | 'parents' => [EntityFieldType::getId($entityTypeId, $fieldName)] |
||
26 | ] + $basePluginDefinition; |
||
27 | } |
||
28 | |||
29 | return $derivatives; |
||
30 | } |
||
31 | |||
32 | } |