private static function _PrepareManyChecklistObjects($dataPost, $task_id)
 {
     $checklists = array();
     if (preg_match("`^.*,*\$`", $dataPost["checklists"])) {
         $checklist_arr = \Applications\PMTool\Helpers\CommonHelper::StringToArray(",", $dataPost["checklists"]);
     } else {
         $checklist_arr = \Applications\PMTool\Helpers\CommonHelper::StringToArray("\n", $dataPost["checklists"]);
     }
     foreach ($checklist_arr as $name) {
         $checklist = new \Applications\PMTool\Models\Dao\Task_check_list();
         $checklist->setTask_id($task_id);
         $checklist->setTask_check_list_complete('0');
         $checklist->setTask_check_list_detail($name);
         array_push($checklists, $checklist);
     }
     return $checklists;
 }
 public function executeGetCheckList(\Library\HttpRequest $rq)
 {
     //Init result
     $result = $this->InitResponseWS();
     $error = true;
     //Get current task
     $currSessTask = \Applications\PMTool\Helpers\TaskHelper::GetCurrentSessionTask($this->user());
     $task_id = $currSessTask['task_info_obj']->task_id();
     $checklist = new \Applications\PMTool\Models\Dao\Task_check_list();
     $checklist->setTask_id($task_id);
     $manager = $this->managers()->getManagerOf($this->module());
     $checklists = $manager->selectMany($checklist, 'task_id');
     if (count($checklists) > 0) {
         $result[\Library\Enums\SessionKeys::TaskChecklist] = $checklists;
         $error = false;
     }
     $this->SendResponseWS($result, array("resx_file" => \Applications\PMTool\Resources\Enums\ResxFileNameKeys::TaskChecklist, "resx_key" => $this->action(), "step" => $error ? "error" : "success"));
 }