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