| 1234567891011121314151617181920212223242526272829 |
- <?php
- Lib::loadClass('FeatureAttrSelected');
- class Api_Process_P5_UnselectAllFeatures { // 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::unselectAll($typeName);
- // $listSelectedState = FeatureAttrSelected::getSelectState($typeName, $listPrimaryKeys);
- // $totalSelected = FeatureAttrSelected::getTotalSelected($typeName);
- header('Content-Type: application/json');
- echo json_encode([
- 'type' => "success",
- 'msg' => "done",
- 'body' => [
- 'selected' => [], // $listSelectedState,
- 'totalSelected' => 0, // $totalSelected,
- ]
- ]);
- exit;
- }
- }
|