当前位置: 首页>>代码示例>>PHP>>正文


PHP app::setPageTitle方法代码示例

本文整理汇总了PHP中app::setPageTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP app::setPageTitle方法的具体用法?PHP app::setPageTitle怎么用?PHP app::setPageTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app的用法示例。


在下文中一共展示了app::setPageTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: executeIndex

 public function executeIndex(sfWebRequest $request)
 {
     $this->checkProjectsAccess('view');
     if (!$this->getUser()->hasAttribute('projects_filter')) {
         $this->getUser()->setAttribute('projects_filter', Projects::getDefaultFilter($this->getUser()));
     }
     $this->filter_by = $this->getUser()->getAttribute('projects_filter');
     if ($fb = $request->getParameter('filter_by')) {
         $this->filter_by[key($fb)] = current($fb);
         $this->getUser()->setAttribute('projects_filter', $this->filter_by);
         $this->redirect('projects/index');
     }
     if ($request->hasParameter('remove_filter')) {
         unset($this->filter_by[$request->getParameter('remove_filter')]);
         $this->getUser()->setAttribute('projects_filter', $this->filter_by);
         $this->redirect('projects/index');
     }
     if ($request->hasParameter('user_filter')) {
         $this->filter_by = Projects::useProjectsFilter($request->getParameter('user_filter'), $this->getUser());
         $this->getUser()->setAttribute('projects_filter', $this->filter_by);
         $this->redirect('projects/index');
     }
     if ($set_order = $request->getParameter('set_order')) {
         $this->getUser()->setAttribute('projects_listing_order', $set_order);
         $this->redirect('projects/index');
     }
     app::setPageTitle('Projects', $this->getResponse());
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:28,代码来源:actions.class.php

示例2: executeIndex

 public function executeIndex(sfWebRequest $request)
 {
     app::setPageTitle('Projects Phases', $this->getResponse());
     $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->checkTasksAccess($this->projects);
     $this->projects_phasess = Doctrine_Core::getTable('ProjectsPhases')->createQuery('a')->addWhere('projects_id=?', $this->projects->getId())->orderBy('name')->execute();
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:7,代码来源:actions.class.php

示例3: 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

示例4: executeIndex

 public function executeIndex(sfWebRequest $request)
 {
     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');
     }
     $this->set_fitlers($request);
     $this->filter_by = $this->getUser()->getAttribute('tasks_filter' . $this->get_pid($request));
     if ($fb = $request->getParameter('filter_by')) {
         $this->filter_by[key($fb)] = current($fb);
         $this->getUser()->setAttribute('tasks_filter' . $this->get_pid($request), $this->filter_by);
         $this->redirect('tasks/index' . $this->add_pid($request));
     }
     if ($request->hasParameter('remove_filter')) {
         unset($this->filter_by[$request->getParameter('remove_filter')]);
         $this->getUser()->setAttribute('tasks_filter' . $this->get_pid($request), $this->filter_by);
         $this->redirect('tasks/index' . $this->add_pid($request));
     }
     if ($set_order = $request->getParameter('set_order')) {
         $this->getUser()->setAttribute('tasks_listing_order' . $this->get_pid($request), $set_order);
         $this->redirect('tasks/index' . $this->add_pid($request));
     }
     app::setPageTitle('Tasks', $this->getResponse());
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:27,代码来源:actions.class.php

示例5: executeIndex

 public function executeIndex(sfWebRequest $request)
 {
     if (!$this->getUser()->hasAttribute('users_filter')) {
         $this->getUser()->setAttribute('users_filter', array());
     }
     $this->filter_by = $this->getUser()->getAttribute('users_filter');
     if ($fb = $request->getParameter('filter_by')) {
         $this->filter_by[key($fb)] = current($fb);
         $this->getUser()->setAttribute('users_filter', $this->filter_by);
         $this->redirect('users/index');
     }
     if ($request->hasParameter('remove_filter')) {
         unset($this->filter_by[$request->getParameter('remove_filter')]);
         $this->getUser()->setAttribute('users_filter', $this->filter_by);
         $this->redirect('users/index');
     }
     $q = Doctrine_Core::getTable('Users')->createQuery('u')->leftJoin('u.UsersGroups ug');
     if ($request->hasParameter('search')) {
         $q = app::addSearchQuery($q, $request->getParameter('search'), 'UsersComments', 'u', $request->getParameter('search_by_extrafields'));
     } else {
         $q = Users::addFiltersToQuery($q, $this->getUser()->getAttribute('users_filter'));
     }
     $this->userss = $q->orderBy('ug.name, u.name')->execute();
     app::setPageTitle('Users', $this->getResponse());
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:25,代码来源:actions.class.php

示例6: 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->checkProjectsAccess($this->projects);
     $this->projects_comments = Doctrine_Core::getTable('ProjectsComments')->createQuery('pc')->leftJoin('pc.Users u')->addWhere('projects_id=?', $request->getParameter('projects_id'))->orderBy('created_at desc')->fetchArray();
     app::setPageTitle($this->projects->getName(), $this->getResponse());
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:7,代码来源:actions.class.php

示例7: executePersonal

 public function executePersonal(sfWebRequest $request)
 {
     $this->checkAccess($this->getUser()->getAttribute('id'), 'view');
     if (!$this->getUser()->hasAttribute('personal_scheduler_current_time')) {
         $this->getUser()->setAttribute('personal_scheduler_current_time', time());
     }
     if ($request->hasParameter('month')) {
         $this->changeMonth($request->getParameter('month'), 'personal_scheduler_current_time');
         $this->redirect('scheduler/personal');
     }
     app::setPageTitle('Personal Scheduler', $this->getResponse());
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:12,代码来源:actions.class.php

示例8: 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

示例9: executeIndex

 public function executeIndex(sfWebRequest $request)
 {
     if ($request->getParameter('projects_id') > 0) {
         $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->checkTicketsAccess('view', false, $this->projects);
     } else {
         $this->checkTicketsAccess('view');
     }
     if (!$this->getUser()->hasAttribute('tickets_filter' . $this->get_pid($request))) {
         $this->getUser()->setAttribute('tickets_filter' . $this->get_pid($request), Tickets::getDefaultFilter($request, $this->getUser()));
     }
     $this->filter_by = $this->getUser()->getAttribute('tickets_filter' . $this->get_pid($request));
     if ($fb = $request->getParameter('filter_by')) {
         $this->filter_by[key($fb)] = current($fb);
         $this->getUser()->setAttribute('tickets_filter' . $this->get_pid($request), $this->filter_by);
         $this->redirect('tickets/index' . $this->add_pid($request));
     }
     if ($request->hasParameter('remove_filter')) {
         unset($this->filter_by[$request->getParameter('remove_filter')]);
         $this->getUser()->setAttribute('tickets_filter' . $this->get_pid($request), $this->filter_by);
         $this->redirect('tickets/index' . $this->add_pid($request));
     }
     if ($request->hasParameter('user_filter')) {
         $this->filter_by = Tickets::useTicketsFilter($request, $this->getUser());
         $this->getUser()->setAttribute('tickets_filter' . $this->get_pid($request), $this->filter_by);
         $this->redirect('tickets/index' . $this->add_pid($request));
     }
     if ($request->hasParameter('delete_user_filter')) {
         app::deleteUserFilter($request->getParameter('delete_user_filter'), 'TicketsReports', $this->getUser());
         $this->getUser()->setFlash('userNotices', t::__('Filter Deleted'));
         $this->redirect('tickets/index' . $this->add_pid($request));
     }
     if ($request->hasParameter('edit_user_filter')) {
         $this->setTemplate('editFilter', 'app');
     }
     if ($request->hasParameter('sort_filters')) {
         $this->setTemplate('sortFilters', 'app');
     }
     if ($set_order = $request->getParameter('set_order')) {
         $this->getUser()->setAttribute('tickets_listing_order' . $this->get_pid($request), $set_order);
         $this->redirect('tickets/index' . $this->add_pid($request));
     }
     app::setPageTitle('Tickets', $this->getResponse());
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:45,代码来源:actions.class.php

示例10: executeIndex

 public function executeIndex(sfWebRequest $request)
 {
     if ($request->hasParameter('delete_logo')) {
         if (is_file(sfConfig::get('sf_upload_dir') . '/' . sfConfig::get('app_app_logo'))) {
             unlink(sfConfig::get('sf_upload_dir') . '/' . sfConfig::get('app_app_logo'));
         }
     }
     if ($request->hasParameter('cfg')) {
         $cfg = $request->getParameter('cfg');
         foreach ($cfg as $key => $value) {
             $configuration = Doctrine_Core::getTable('Configuration')->createQuery('c')->addWhere('c.key = ?', $key)->fetchOne();
             if (is_array($value)) {
                 $value = implode(',', $value);
             }
             if ($key == 'app_app_logo') {
                 $file = $request->getFiles();
                 if (strlen($file['cfg_app_app_logo_file']['name']) > 0) {
                     if (getimagesize($file['cfg_app_app_logo_file']['tmp_name'])) {
                         move_uploaded_file($file['cfg_app_app_logo_file']['tmp_name'], sfConfig::get('sf_upload_dir') . '/' . $file['cfg_app_app_logo_file']['name']);
                         $value = $file['cfg_app_app_logo_file']['name'];
                     }
                 }
             }
             if ($configuration) {
                 $configuration->setValue($value);
                 $configuration->save();
             } else {
                 $sql = "INSERT INTO configuration (configuration.key, configuration.value) VALUES ('" . $key . "', '" . $value . "')";
                 $connection = Doctrine_Manager::connection();
                 $connection->execute($sql);
             }
         }
         $this->getUser()->setFlash('userNotices', t::__('Configuration has been successfully updated'));
         $this->redirect('configuration/index?type=' . $request->getParameter('type'));
     }
     app::setPageTitle('Configuration', $this->getResponse());
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:37,代码来源:actions.class.php

示例11: executeXlsTasksImport

 public function executeXlsTasksImport(sfWebRequest $request)
 {
     app::setPageTitle('Import Spreadsheet', $this->getResponse());
     if ($request->isMethod(sfRequest::PUT)) {
         if ($request->hasParameter('import_file')) {
             if (is_file($import_spreadsheet_file = sfConfig::get('sf_upload_dir') . '/' . $request->getParameter('import_file'))) {
                 $import_fields = $this->getUser()->getAttribute('import_fields');
                 $data = new Spreadsheet_Excel_Reader($import_spreadsheet_file);
                 $projects_id = $request->getParameter('projects_id');
                 if ($request->getParameter('import_first_row') == 1) {
                     $first_row = 1;
                 } elseif ($data->rowcount() > 2) {
                     $first_row = 2;
                 } else {
                     $first_row = 1;
                 }
                 for ($i = $first_row; $i <= $data->rowcount(); $i++) {
                     $t = new Tasks();
                     $t->setCreatedBy($this->getUser()->getAttribute('id'))->setCreatedAt(date('Y-m-d H:i:s'))->setProjectsId($request->getParameter('projects_id'));
                     $extra_fields = array();
                     for ($j = 1; $j <= $data->colcount(); $j++) {
                         if (isset($import_fields[$j])) {
                             $v = $data->val($i, $j);
                             if (strlen(trim($v)) == 0) {
                                 continue;
                             }
                             switch ($import_fields[$j]) {
                                 case 'TasksGroups':
                                     if ($id = app::getProjectCfgItemIdByName($v, 'TasksGroups', $projects_id)) {
                                         $t->setTasksGroupsId($id);
                                     } else {
                                         $cfg = new TasksGroups();
                                         $cfg->setName($v);
                                         $cfg->setProjectsId($projects_id);
                                         $cfg->save();
                                         $t->setTasksGroupsId($cfg->getId());
                                     }
                                     break;
                                 case 'Versions':
                                     if ($id = app::getProjectCfgItemIdByName($v, 'Versions', $projects_id)) {
                                         $t->setVersionsId($id);
                                     } else {
                                         $cfg = new Versions();
                                         $cfg->setName($v);
                                         $cfg->setProjectsId($projects_id);
                                         $cfg->save();
                                         $t->setVersionsId($cfg->getId());
                                     }
                                     break;
                                 case 'ProjectsPhases':
                                     if ($id = app::getProjectCfgItemIdByName($v, 'ProjectsPhases', $projects_id)) {
                                         $t->setProjectsPhasesId($id);
                                     } else {
                                         $cfg = new ProjectsPhases();
                                         $cfg->setName($v);
                                         $cfg->setProjectsId($projects_id);
                                         $cfg->save();
                                         $t->setProjectsPhasesId($cfg->getId());
                                     }
                                     break;
                                 case 'TasksPriority':
                                     if ($id = app::getCfgItemIdByName($v, 'TasksPriority')) {
                                         $t->setTasksPriorityId($id);
                                     } else {
                                         $cfg = new TasksPriority();
                                         $cfg->setName($v);
                                         $cfg->save();
                                         $t->setTasksPriorityId($cfg->getId());
                                     }
                                     break;
                                 case 'TasksLabels':
                                     if ($id = app::getCfgItemIdByName($v, 'TasksLabels')) {
                                         $t->setTasksLabelId($id);
                                     } else {
                                         $cfg = new TasksLabels();
                                         $cfg->setName($v);
                                         $cfg->save();
                                         $t->setTasksLabelId($cfg->getId());
                                     }
                                     break;
                                 case 'name':
                                     $t->setName($v);
                                     break;
                                 case 'TasksStatus':
                                     if ($id = app::getCfgItemIdByName($v, 'TasksStatus')) {
                                         $t->setTasksStatusId($id);
                                     } else {
                                         $cfg = new TasksStatus();
                                         $cfg->setName($v);
                                         $cfg->save();
                                         $t->setTasksStatusId($cfg->getId());
                                     }
                                     break;
                                 case 'TasksTypes':
                                     if ($id = app::getCfgItemIdByName($v, 'TasksTypes')) {
                                         $t->setTasksTypeId($id);
                                     } else {
                                         $cfg = new TasksTypes();
                                         $cfg->setName($v);
                                         $cfg->save();
//.........这里部分代码省略.........
开发者ID:noikiy,项目名称:qdpm,代码行数:101,代码来源:actions.class.php

示例12: executeView

 public function executeView(sfWebRequest $request)
 {
     $this->forward404Unless($this->tickets_reports = Doctrine_Core::getTable('TicketsReports')->find(array($request->getParameter('id'))), sprintf('Object tickets_reports does not exist (%s).', $request->getParameter('id')));
     $this->checkAccess($this->tickets_reports, true);
     app::setPageTitle($this->tickets_reports->getName(), $this->getResponse());
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:6,代码来源:actions.class.php

示例13: executeIndex

 public function executeIndex(sfWebRequest $request)
 {
     $this->departmentss = Doctrine_Core::getTable('Departments')->createQuery()->orderBy('sort_order,name')->execute();
     app::setPageTitle('Departments', $this->getResponse());
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:5,代码来源:actions.class.php

示例14: executeLdap

 public function executeLdap(sfWebRequest $request)
 {
     $this->form = new LdapLoginForm();
     if ($request->isMethod('post')) {
         $this->form->bind($request->getParameter($this->form->getName()));
         if ($this->form->isValid()) {
             $ldap = new ldapLogin();
             $user_attr = $ldap->doLdapLogin($this->form['user']->getValue(), $this->form['password']->getValue());
             if ($user_attr['status'] == true) {
                 $userName = $this->form['user']->getValue();
                 $userEmail = $this->form['user']->getValue() . '@localhost.com';
                 if (strlen($user_attr['email']) > 0) {
                     $userEmail = $user_attr['email'];
                 }
                 if (strlen($user_attr['name']) > 0) {
                     $userName = $user_attr['name'];
                 }
                 $q = Doctrine_Core::getTable('Users')->createQuery()->addWhere('email=?', $userEmail);
                 if (!($user = $q->fetchOne())) {
                     $user = new Users();
                     $user->setUsersGroupId(sfConfig::get('app_ldap_default_user_group'));
                     $user->setName($userName);
                     $user->setEmail($userEmail);
                     $user->setPassword(md5($this->form['password']->getValue()));
                     $user->setActive(1);
                     $user->setCulture(sfConfig::get('sf_default_culture'));
                     $user->save();
                 } else {
                     if ($user->getActive() != 1) {
                         $this->getUser()->setFlash('userNotices', I18NText::__('Your account is not active'));
                         $this->redirect('login/ldap');
                     }
                 }
                 $this->doUserLogin($user, $request);
             } else {
                 $this->getUser()->setFlash('userNotices', t::__($user_attr['msg']));
                 $this->redirect('login/ldap');
             }
         }
     }
     app::setPageTitle('LDAP Login', $this->getResponse());
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:42,代码来源:actions.class.php

示例15: executeIndex

 public function executeIndex(sfWebRequest $request)
 {
     app::setPageTitle('Phase Status', $this->getResponse());
     $this->phases_statuss = Doctrine_Core::getTable('PhasesStatus')->createQuery('a')->orderBy('sort_order, name')->execute();
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:5,代码来源:actions.class.php


注:本文中的app::setPageTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。