@@ -51,7 +51,7 @@ public static function getDefaultConfiguration()
51
51
*
52
52
* @inheritdoc
53
53
*/
54
- public function getConfiguration ()
54
+ public function getConfiguration ($ public = true )
55
55
{
56
56
$ configuration = parent ::getConfiguration ();
57
57
$ configuration ['debug ' ] = isset ($ configuration ['debug ' ]) ? $ configuration ['debug ' ] : false ;
@@ -65,6 +65,11 @@ public function getConfiguration()
65
65
$ scheme ['featureType ' ] = $ featureTypes [ $ featureTypeName ];
66
66
$ scheme ['featureTypeName ' ] = $ featureTypeName ;
67
67
}
68
+
69
+ if ($ public ) {
70
+ $ this ->cleanFromInternConfiguration ($ scheme ['featureType ' ]);
71
+ }
72
+
68
73
if (isset ($ scheme ['formItems ' ])) {
69
74
$ scheme ['formItems ' ] = $ this ->prepareItems ($ scheme ['formItems ' ]);
70
75
}
@@ -107,7 +112,7 @@ protected function prepareQueriedFeatureData($feature, $formItems)
107
112
public function httpAction ($ action )
108
113
{
109
114
/** @var $requestService Request */
110
- $ configuration = $ this ->getConfiguration ();
115
+ $ configuration = $ this ->getConfiguration (false );
111
116
$ requestService = $ this ->container ->get ('request ' );
112
117
$ request = json_decode ($ requestService ->getContent (), true );
113
118
$ schemas = $ configuration ["schemes " ];
@@ -263,4 +268,26 @@ public function httpAction($action)
263
268
264
269
return new JsonResponse ($ results );
265
270
}
271
+
272
+ /**
273
+ * Clean feature type configuration for public use
274
+ *
275
+ * @param array $featureType
276
+ * @return array
277
+ */
278
+ protected function cleanFromInternConfiguration (array &$ featureType )
279
+ {
280
+ foreach (array (
281
+ 'filter ' ,
282
+ 'geomField ' ,
283
+ 'table ' ,
284
+ 'connection ' ,
285
+ 'uniqueId ' ,
286
+ 'sql ' ,
287
+ 'events '
288
+ ) as $ keyName ) {
289
+ unset($ featureType [ $ keyName ]);
290
+ }
291
+ return $ featureType ;
292
+ }
266
293
}
0 commit comments