public function __construct(Application $app, $module, $action, $resxfile) { parent::__construct($app); $this->managers = new \Library\DAL\Managers('PDO', $app); $this->page = new Page($app); $this->user = $app->user(); $this->setModule($module); $this->setAction($action); $this->setView($action); $this->setResxFile($resxfile); $this->setDataPost($this->app->HttpRequest()->retrievePostAjaxData(FALSE)); $this->resxData = $this->app->i8n->getLocalResourceArray($this->resxfile); $this->setUploadingFiles(); $this->toolTips[\Applications\PMTool\Resources\Enums\ViewVariables\Popup::ellipsis_tooltip_settings] = \Applications\PMTool\Helpers\PopUpHelper::getTooltipEllipsisSettings('{"targetcontroller":"' . $this->module . '","targetaction": "' . $this->action . '"}', $app->name()); }
public function executeLabMatrix(\Library\HttpRequest $rq) { $sessionProject = \Applications\PMTool\Helpers\ProjectHelper::GetCurrentSessionProject($this->app()->user()); \Applications\PMTool\Helpers\AnalyteHelper::StoreListsData($this); $pm = \Applications\PMTool\Helpers\PmHelper::GetCurrentSessionPm($this->user()); $sessionTask = \Applications\PMTool\Helpers\TaskHelper::GetCurrentSessionTask($this->user()); //Task tab status $tab_status_arr = \Applications\PMTool\Helpers\TaskHelper::TabStatusFor($sessionTask); $this->page->addVar(\Applications\PMTool\Resources\Enums\ViewVariables\Task::task_tab_status_keys, $tab_status_arr); //Task tab status //Analyte Matrix tab status $showLabMatrixTabs = \Applications\PMTool\Helpers\TaskAnalyteMatrixHelper::DoesAnalytesAndLocationsExistsFor($sessionTask, $this, 'Lab'); $showFieldMatrixTabs = \Applications\PMTool\Helpers\TaskAnalyteMatrixHelper::DoesAnalytesAndLocationsExistsFor($sessionTask, $this, 'Field'); $this->page->addVar(\Applications\PMTool\Resources\Enums\ViewVariables\Task::task_show_lab_matrix, $showLabMatrixTabs); $this->page->addVar(\Applications\PMTool\Resources\Enums\ViewVariables\Task::task_show_field_matrix, $showFieldMatrixTabs); //Analyte Matrix tab status //Get task specific lab analytes $task_lab_analytes = \Applications\PMTool\Helpers\AnalyteHelper::GetAndStoreTaskLabAnalytes($this, $sessionTask); //Check which page to render $pg = is_null($rq->getData('pg')) ? 1 : intval($rq->getData('pg')) == 0 ? 1 : intval($rq->getData('pg')); //Calculate pages $pages = \Applications\PMTool\Helpers\TaskAnalyteMatrixHelper::returnTotalPagesOfAnalytes($task_lab_analytes, $this->app); //Filter paged result set of analytes //$task_lab_analytes = \Applications\PMTool\Helpers\TaskAnalyteMatrixHelper::returnPagedAnalyteObjects($task_lab_analytes, $pg, $this->app); //Fetch ELLIPSIS tooltip settings from xml and pass to view as an array $ellipsis_tooltip_settings = \Applications\PMTool\Helpers\PopUpHelper::getTooltipEllipsisSettings('{"targetcontroller":"taskLabAnalyte", "targetaction": "labMatrix"}', $this->app->name()); $this->page->addVar(\Applications\PMTool\Resources\Enums\ViewVariables\Popup::ellipsis_tooltip_settings, $ellipsis_tooltip_settings); //Task specific locations $project_locations = \Applications\PMTool\Helpers\LocationHelper::GetProjectLocations($this, $sessionProject); $task_locations = \Applications\PMTool\Helpers\LocationHelper::GetAndStoreTaskLocations($this, $sessionTask); //Get LocationLabMatrix relation $id_map = \Applications\PMTool\Helpers\TaskAnalyteMatrixHelper::GetAnalyteMatrixForTask($this, $sessionTask[\Library\Enums\SessionKeys::TaskObj]->task_id(), 'Lab'); \Applications\PMTool\Helpers\TaskHelper::SetActiveTab($this->user(), \Applications\PMTool\Resources\Enums\TaskTabKeys::LabSampleMatrixTab); $this->page->addVar(\Applications\PMTool\Resources\Enums\ViewVariablesKeys::currentProject, $sessionProject[\Library\Enums\SessionKeys::ProjectObject]); $this->page->addVar(\Applications\PMTool\Resources\Enums\ViewVariablesKeys::currentTask, $sessionTask[\Library\Enums\SessionKeys::TaskObj]); $this->page->addVar(\Applications\PMTool\Resources\Enums\ViewVariablesKeys::task_locations, $task_locations); $this->page->addVar(\Applications\PMTool\Resources\Enums\ViewVariablesKeys::task_lab_analytes, $task_lab_analytes); $this->page->addVar(\Applications\PMTool\Resources\Enums\ViewVariablesKeys::task_analytes_pages, $pages); $this->page->addVar(\Applications\PMTool\Resources\Enums\ViewVariablesKeys::current_page, $pg); $this->page->addVar(\Applications\PMTool\Resources\Enums\ViewVariablesKeys::task_lab_analytes_idmap, $id_map); //tab status $this->page->addVar(\Applications\PMTool\Resources\Enums\ViewVariablesKeys::tabStatus, \Applications\PMTool\Helpers\TaskHelper::GetTabsStatus($this->user())); $this->page->addVar(\Applications\PMTool\Resources\Enums\ViewVariablesKeys::form_modules, $this->app()->router()->selectedRoute()->phpModules()); }