當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Tasks::getDefaultFilter方法代碼示例

本文整理匯總了PHP中Tasks::getDefaultFilter方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tasks::getDefaultFilter方法的具體用法?PHP Tasks::getDefaultFilter怎麽用?PHP Tasks::getDefaultFilter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Tasks的用法示例。


在下文中一共展示了Tasks::getDefaultFilter方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: executeIndex

 public function executeIndex(sfWebRequest $request)
 {
     app::setPageTitle('Gantt Chart', $this->getResponse());
     if ($request->hasParameter('projects_id')) {
         $this->forward404Unless($this->projects = Doctrine_Core::getTable('Projects')->createQuery()->addWhere('id=?', $request->getParameter('projects_id'))->fetchOne(), sprintf('Object projects does not exist (%s).', $request->getParameter('projects_id')));
         $this->checkProjectsAccess($this->projects);
         $this->checkTasksAccess('view', false, $this->projects);
     } else {
         $this->checkTasksAccess('view');
     }
     if (!$this->getUser()->hasAttribute('gantt_filter' . $this->get_pid($request))) {
         $this->getUser()->setAttribute('gantt_filter' . $this->get_pid($request), Tasks::getDefaultFilter($request, $this->getUser(), 'ganttChart'));
     }
     $this->filter_by = $this->getUser()->getAttribute('gantt_filter' . $this->get_pid($request));
     if ($fb = $request->getParameter('filter_by')) {
         $this->filter_by[key($fb)] = current($fb);
         $this->getUser()->setAttribute('gantt_filter' . $this->get_pid($request), $this->filter_by);
         $this->redirect('ganttChart/index' . $this->add_pid($request));
     }
     if ($request->hasParameter('remove_filter')) {
         unset($this->filter_by[$request->getParameter('remove_filter')]);
         $this->getUser()->setAttribute('gantt_filter' . $this->get_pid($request), $this->filter_by);
         $this->redirect('ganttChart/index' . $this->add_pid($request));
     }
     $this->tasks_tree = array();
     $this->tasks_list = $this->getTasks($request, $this->tasks_tree);
 }
開發者ID:noikiy,項目名稱:qdpm,代碼行數:27,代碼來源:actions.class.php

示例2: executeMyTimeReport

 public function executeMyTimeReport(sfWebRequest $request)
 {
     if (!$this->getUser()->hasCredential('reports_access_time_personal')) {
         $this->redirect('accessForbidden/index');
     }
     $this->checkTasksAccess('view');
     if (!$this->getUser()->hasAttribute('my_time_report_filter')) {
         $this->getUser()->setAttribute('my_time_report_filter', Tasks::getDefaultFilter($request, $this->getUser(), 'timeReport'));
     }
     $this->filter_by = $this->getUser()->getAttribute('my_time_report_filter');
     if ($fb = $request->getParameter('filter_by')) {
         foreach ($fb as $k => $v) {
             $this->filter_by[$k] = $v;
         }
         $this->getUser()->setAttribute('my_time_report_filter', $this->filter_by);
         $this->redirect('timeReport/myTimeReport');
     }
     if ($request->hasParameter('remove_filter')) {
         unset($this->filter_by[$request->getParameter('remove_filter')]);
         $this->getUser()->setAttribute('my_time_report_filter', $this->filter_by);
         $this->redirect('timeReport/myTimeReport');
     }
     $this->filter_by['CommentCreatedBy'] = $this->getUser()->getAttribute('id');
     $this->getUser()->setAttribute('my_time_report_filter', $this->filter_by);
     app::setPageTitle('My Time Report', $this->getResponse());
     $this->tasks_comments = $this->getTasksComments($request, 'my_time_report_filter');
     $this->setTemplate('index');
 }
開發者ID:noikiy,項目名稱:qdpm,代碼行數:28,代碼來源:actions.class.php

示例3: executeIndex

 public function executeIndex(sfWebRequest $request)
 {
     $this->forward404Unless($this->projects = Doctrine_Core::getTable('Projects')->createQuery()->addWhere('id=?', $request->getParameter('projects_id'))->fetchOne(), sprintf('Object projects does not exist (%s).', $request->getParameter('projects_id')));
     $this->forward404Unless($this->tasks = Doctrine_Core::getTable('Tasks')->createQuery()->addWhere('id=?', $request->getParameter('tasks_id'))->addWhere('projects_id=?', $request->getParameter('projects_id'))->fetchOne(), sprintf('Object tasks does not exist (%s).', $request->getParameter('id')));
     $this->checkProjectsAccess($this->projects);
     $this->checkTasksAccess('view', $this->tasks, $this->projects);
     if (!$this->getUser()->hasAttribute('tasks_filter' . $request->getParameter('projects_id'))) {
         $this->getUser()->setAttribute('tasks_filter' . $request->getParameter('projects_id'), Tasks::getDefaultFilter($request, $this->getUser()));
     }
     $this->tasks_comments = Doctrine_Core::getTable('TasksComments')->createQuery('tc')->leftJoin('tc.Users u')->addWhere('tc.tasks_id=?', $request->getParameter('tasks_id'))->orderBy('tc.created_at desc')->fetchArray();
     $this->more_actions = $this->getMoreActions($request);
     app::setPageTitle(t::__('Task') . ' | ' . ($this->tasks->getTasksLabelId() > 0 ? $this->tasks->getTasksLabels()->getName() . ': ' : '') . $this->tasks->getName(), $this->getResponse());
 }
開發者ID:noikiy,項目名稱:qdpm,代碼行數:13,代碼來源:actions.class.php

示例4: set_fitlers

 protected function set_fitlers($request)
 {
     if (!$this->getUser()->hasAttribute('tasks_filter' . $this->get_pid($request))) {
         $this->getUser()->setAttribute('tasks_filter' . $this->get_pid($request), Tasks::getDefaultFilter($request, $this->getUser()));
     }
 }
開發者ID:noikiy,項目名稱:qdpm,代碼行數:6,代碼來源:actions.class.php


注:本文中的Tasks::getDefaultFilter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。