コード例 #1
0
 public function executeGetItem(\Library\HttpRequest $rq)
 {
     // Init result
     $result = $this->InitResponseWS();
     $location_id = intval($this->dataPost["location_id"]);
     //$location_selected = $this->_GetLocationFromSession($location_id);
     $location_selected = \Applications\PMTool\Helpers\LocationHelper::GetLocationFromDB($this, $location_id);
     if ($location_selected) {
         $this->user()->setAttribute(\Library\Enums\SessionKeys::CurrentLocationId, $location_id);
     }
     $result["location"] = $location_selected;
     $this->SendResponseWS($result, array("resx_file" => \Applications\PMTool\Resources\Enums\ResxFileNameKeys::Location, "resx_key" => $this->action(), "step" => $location_selected !== NULL ? "success" : "error"));
 }