| 1234567891011121314151617181920212223 |
- <?php
- Lib::loadClass('FeatureAttrSelected');
- class Api_Process_P5_UnselectFeature { // TODO: extends Api_ProcessBase
- static function run($args, $responseForm) {
- $typeName = (!empty($args['typeName'][0])) ? $args['typeName'][0] : '';
- if (!$typeName) throw new Api_OwsException("Missing value for 'typeName'", 501, null, 'MissingParameterValue', 'request');
- $listPrimaryKeys = (!empty($args['primaryKey'])) ? $args['primaryKey'] : [];
- if (empty($listPrimaryKeys)) throw new Api_OwsException("Missing value for 'primaryKey'", 501, null, 'MissingParameterValue', 'request');
- FeatureAttrSelected::unselect($typeName, $listPrimaryKeys);
- header('Content-Type: application/json');
- echo json_encode([
- 'type' => "success",
- 'msg' => "done",
- ]);
- exit;
- }
- }
|