当前位置: 首页>>代码示例>>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;未经允许,请勿转载。