1 | <?php |
||
20 | class Field |
||
21 | { |
||
22 | /** |
||
23 | * @return FieldFactory |
||
24 | */ |
||
25 | protected function getFieldFactory() |
||
29 | |||
30 | /** |
||
31 | * @return SectionsService |
||
32 | */ |
||
33 | private function getSectionsService() |
||
37 | |||
38 | /** |
||
39 | * @return UserGroupsService |
||
40 | */ |
||
41 | private function getUserGroupsService() |
||
45 | |||
46 | /** |
||
47 | * @return AssetSources |
||
48 | */ |
||
49 | private function getAssetSourcesService() |
||
53 | |||
54 | /** |
||
55 | * @return CategoryGroupsService |
||
56 | */ |
||
57 | private function getCategoryGroupsService() |
||
61 | |||
62 | /** |
||
63 | * @param FieldModel $field |
||
64 | * @param $includeContext |
||
65 | * |
||
66 | * @return array |
||
67 | */ |
||
68 | public function getDefinition(FieldModel $field, $includeContext) |
||
89 | |||
90 | /** |
||
91 | * @param array $fieldDefinition |
||
92 | * @param FieldModel $field |
||
93 | * @param string $fieldHandle |
||
94 | * @param FieldGroupModel|null $group |
||
95 | */ |
||
96 | public function populate(array $fieldDefinition, FieldModel $field, $fieldHandle, FieldGroupModel $group = null) |
||
116 | |||
117 | /** |
||
118 | * Get sources based on the indexFrom attribute and return them with the indexTo attribute. |
||
119 | * |
||
120 | * @param string|array $sources |
||
121 | * @param string $indexFrom |
||
122 | * @param string $indexTo |
||
123 | * |
||
124 | * @return array|string |
||
125 | */ |
||
126 | private function getMappedSources($sources, $indexFrom, $indexTo) |
||
138 | |||
139 | /** |
||
140 | * Gets a source by the attribute indexFrom, and returns it with attribute $indexTo. |
||
141 | * |
||
142 | * @TODO Break up and simplify this method |
||
143 | * |
||
144 | * @param string $source |
||
145 | * @param string $indexFrom |
||
146 | * @param string $indexTo |
||
147 | * |
||
148 | * @return string |
||
149 | */ |
||
150 | private function getSource($source, $indexFrom, $indexTo) |
||
190 | } |
||
191 |