1 | <?php |
||
28 | class FieldDefinitionSubManager implements LoggerAwareInterface |
||
29 | { |
||
30 | /** |
||
31 | * @var ContentTypeService Content type service |
||
32 | */ |
||
33 | private $contentTypeService; |
||
34 | |||
35 | /** |
||
36 | * @var LoggerInterface |
||
37 | */ |
||
38 | private $logger; |
||
39 | |||
40 | /** |
||
41 | * FieldDefinitionSubManager constructor. |
||
42 | * |
||
43 | * @param ContentTypeService $contentTypeService |
||
44 | */ |
||
45 | 5 | public function __construct(ContentTypeService $contentTypeService) |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | 5 | public function setLogger(LoggerInterface $logger) |
|
57 | |||
58 | /** |
||
59 | * @param ContentTypeCreateStruct $createStruct |
||
60 | * @param FieldDefinitionObject[] $fields |
||
61 | */ |
||
62 | 4 | public function addFieldsToCreateStruct(ContentTypeCreateStruct $createStruct, array $fields) |
|
71 | |||
72 | /** |
||
73 | * Creating new and updates existing field definitions. |
||
74 | * NOTE: Will NOT delete field definitions which no longer exist. |
||
75 | * |
||
76 | * @param FieldDefinitionObject[] $updatedFieldDefinitions |
||
77 | * @param FieldDefinition[] $existingFieldDefinitions |
||
78 | * @param ContentTypeDraft $contentTypeDraft |
||
79 | */ |
||
80 | 33 | public function createOrUpdateFieldDefinitions(array $updatedFieldDefinitions, array $existingFieldDefinitions, ContentTypeDraft $contentTypeDraft) |
|
103 | |||
104 | /** |
||
105 | * @param FieldDefinitionObject $field |
||
106 | * |
||
107 | * @return FieldDefinitionCreateStruct |
||
108 | */ |
||
109 | 1 | private function createFieldDefinition(FieldDefinitionObject $field) |
|
116 | |||
117 | /** |
||
118 | * @param FieldDefinitionObject $field |
||
119 | * |
||
120 | * @return FieldDefinitionUpdateStruct |
||
121 | */ |
||
122 | 33 | private function updateFieldDefinition(FieldDefinitionObject $field) |
|
129 | } |
||
130 |