1 | <?php |
||
21 | trait FieldLayoutMutatorTrait |
||
22 | { |
||
23 | /** |
||
24 | * @var FieldLayout|null |
||
25 | */ |
||
26 | private $fieldLayout; |
||
27 | |||
28 | /** |
||
29 | * @return string |
||
30 | */ |
||
31 | abstract static protected function fieldLayoutType(): string; |
||
32 | |||
33 | /** |
||
34 | * @param $id |
||
35 | * @return $this |
||
36 | */ |
||
37 | public function setFieldLayoutId(int $id) |
||
42 | |||
43 | /** |
||
44 | * Get associated fieldLayoutId |
||
45 | * |
||
46 | * @return int|null |
||
47 | */ |
||
48 | public function getFieldLayoutId() |
||
56 | |||
57 | /** |
||
58 | * @param mixed $fieldLayout |
||
59 | * @return $this |
||
60 | */ |
||
61 | public function setFieldLayout($fieldLayout = null) |
||
74 | |||
75 | /** |
||
76 | * @return FieldLayout |
||
77 | */ |
||
78 | public function getFieldLayout(): FieldLayout |
||
99 | |||
100 | /** |
||
101 | * @param FieldLayout $fieldLayout |
||
102 | * @return FieldLayout |
||
103 | */ |
||
104 | protected function setTypeOnFieldLayout(FieldLayout $fieldLayout): FieldLayout |
||
112 | |||
113 | /** |
||
114 | * @return FieldLayout|null |
||
115 | */ |
||
116 | protected function resolveFieldLayout() |
||
124 | |||
125 | /** |
||
126 | * @return FieldLayout|null |
||
127 | */ |
||
128 | private function resolveFieldLayoutFromId() |
||
136 | |||
137 | /** |
||
138 | * @return FieldLayout|null |
||
139 | */ |
||
140 | private function resolveFieldLayoutFromType() |
||
146 | |||
147 | /** |
||
148 | * @return FieldLayout |
||
149 | */ |
||
150 | private function createFieldLayout(): FieldLayout |
||
158 | |||
159 | /** |
||
160 | * @param $fieldLayout |
||
161 | * @return FieldLayout|null |
||
162 | */ |
||
163 | protected function internalResolveFieldLayout($fieldLayout = null): FieldLayout |
||
190 | } |
||
191 |