@@ -41,43 +41,17 @@ class Dao extends Model\Dao\PimcoreLocationAwareConfigDao
41
41
*/
42
42
private static $ _config = null ;
43
43
44
- /**
45
- * @deprecated Will be removed in Pimcore 11
46
- */
47
- private const LEGACY_FILE = 'datahub-configurations.php ' ;
48
-
49
- /**
50
- * @deprecated Will be removed as soon as Pimcore 10.6 isn´t supported anymore.
51
- */
52
- public const CONFIG_PATH = PIMCORE_CONFIGURATION_DIRECTORY . '/data_hub ' ;
53
-
54
44
public function configure (): void
55
45
{
56
46
$ config = \Pimcore::getContainer ()->getParameter ('pimcore_data_hub ' );
57
47
58
- if (\Pimcore \Version::getMajorVersion () >= 11 ) {
59
- $ storageConfig = $ config ['config_location ' ]['data_hub ' ];
48
+ $ storageConfig = $ config ['config_location ' ]['data_hub ' ];
49
+ parent ::configure ([
50
+ 'containerConfig ' => $ config ['configurations ' ] ?? [],
51
+ 'settingsStoreScope ' => 'pimcore_data_hub ' ,
52
+ 'storageConfig ' => $ storageConfig ,
53
+ ]);
60
54
61
- parent ::configure ([
62
- 'containerConfig ' => $ config ['configurations ' ] ?? [],
63
- 'settingsStoreScope ' => 'pimcore_data_hub ' ,
64
- 'storageConfig ' => $ storageConfig ,
65
- ]);
66
- } else {
67
- $ storageConfig = Config \LocationAwareConfigRepository::getStorageConfigurationCompatibilityLayer (
68
- $ config ,
69
- 'data_hub ' ,
70
- 'PIMCORE_CONFIG_STORAGE_DIR_DATA_HUB ' ,
71
- 'PIMCORE_WRITE_TARGET_DATA_HUB '
72
- );
73
-
74
- parent ::configure ([
75
- 'containerConfig ' => $ config ['configurations ' ] ?? [],
76
- 'settingsStoreScope ' => 'pimcore_data_hub ' ,
77
- 'storageDirectory ' => $ storageConfig ,
78
- 'legacyConfigFile ' => self ::LEGACY_FILE ,
79
- ]);
80
- }
81
55
}
82
56
83
57
/**
@@ -131,7 +105,7 @@ public function setVariables($data)
131
105
* @param string $name
132
106
*
133
107
*/
134
- public function loadByName ($ name )
108
+ public function getByName ($ name )
135
109
{
136
110
$ data = $ this ->getDataByName ($ name );
137
111
@@ -146,42 +120,6 @@ public function loadByName($name)
146
120
}
147
121
}
148
122
149
- /**
150
- * @deprecated Will be removed in Pimcore 11
151
- *
152
- * get a configuration by name.
153
- *
154
- * TODO: remove this static function and rename "loadByName" to "getByName"
155
- *
156
- * @param string $name
157
- *
158
- */
159
- public static function getByName ($ name )
160
- {
161
- try {
162
- $ config = new Configuration (null , null );
163
- $ config ->getDao ()->loadByName ($ name );
164
-
165
- return $ config ;
166
- } catch (\Pimcore \Model \Exception \NotFoundException $ e ) {
167
- return null ;
168
- }
169
- }
170
-
171
- /**
172
- *
173
- * @return int
174
- *
175
- *@deprecated will be removed with pimcore 11
176
- *
177
- * get latest modification date of configuration file.
178
- *
179
- */
180
- public static function getConfigModificationDate ()
181
- {
182
- return 0 ;
183
- }
184
-
185
123
/**
186
124
* get the whole configuration file content.
187
125
*
@@ -220,7 +158,7 @@ private function &getConfig()
220
158
* get the list of configurations.
221
159
*
222
160
*/
223
- public function loadList (): array
161
+ public function getList (): array
224
162
{
225
163
$ list = [];
226
164
@@ -234,22 +172,6 @@ public function loadList(): array
234
172
return $ list ;
235
173
}
236
174
237
- /**
238
- * @deprecated Will be removed in Pimcore 11
239
- *
240
- * get the list of configurations.
241
- *
242
- * TODO: remove this static function and rename "loadList" to "getList"
243
- *
244
- *
245
- */
246
- public static function getList (): array
247
- {
248
- $ configuration = new Configuration (null , null );
249
-
250
- return $ configuration ->getDao ()->loadList ();
251
- }
252
-
253
175
/**
254
176
* @param mixed $data
255
177
*
0 commit comments