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


PHP Codendi_Request类代码示例

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


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

示例1: process

 public function process(Tracker_IDisplayTrackerLayout $layout, Codendi_Request $request, PFUser $current_user)
 {
     if ($this->workflow_factory->deleteWorkflow($request->get('delete'))) {
         $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('workflow_admin', 'deleted'));
         $GLOBALS['Response']->redirect(TRACKER_BASE_URL . '/?' . http_build_query(array('tracker' => (int) $this->tracker->id, 'func' => Workflow::FUNC_ADMIN_TRANSITIONS)));
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:Delete.class.php

示例2: process

 public function process(Tracker_IDisplayTrackerLayout $layout, Codendi_Request $request, PFUser $current_user)
 {
     if (!$this->tracker->userCanSubmitArtifact($current_user)) {
         $this->logsErrorAndRedirectToTracker('plugin_tracker_admin', 'access_denied');
         return;
     }
     $from_artifact = $this->artifact_factory->getArtifactByIdUserCanView($current_user, $request->get('from_artifact_id'));
     if (!$from_artifact || $from_artifact->getTracker() !== $this->tracker) {
         $this->logsErrorAndRedirectToTracker('plugin_tracker_include_type', 'error_missing_param');
         return;
     }
     $from_changeset = $from_artifact->getChangeset($request->get('from_changeset_id'));
     if (!$from_changeset) {
         $this->logsErrorAndRedirectToTracker('plugin_tracker_include_type', 'error_missing_param');
         return;
     }
     $submitted_values = $request->get('artifact');
     if (!is_array($submitted_values)) {
         $this->logsErrorAndRedirectToTracker('plugin_tracker_include_type', 'error_missing_param');
         return;
     }
     try {
         $this->processCopy($from_changeset, $current_user, $submitted_values);
     } catch (Tracker_XML_Exporter_TooManyChildrenException $exception) {
         $GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('plugin_tracker_artifact', 'copy_too_many_children', array(Tracker_XML_ChildrenCollector::MAX)));
         $this->redirectToArtifact($from_artifact);
     }
 }
开发者ID:amanikamail,项目名称:tuleap,代码行数:28,代码来源:CopyArtifact.class.php

示例3: index

 public function index(Codendi_Request $request)
 {
     if (!$request->get('type_of_search')) {
         $request->set('type_of_search', Search_SearchProject::NAME);
     }
     $this->results($request);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:SearchController.class.php

示例4: execute

 /**
  * @see Cardwall_OnTop_Config_Command::execute()
  */
 public function execute(Codendi_Request $request)
 {
     if ($request->get('new_column')) {
         $this->dao->create($this->tracker->getId(), $request->get('new_column'));
         $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_column_added'));
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:CreateColumn.class.php

示例5: getControllerFromRequest

 private function getControllerFromRequest(Codendi_Request $request)
 {
     if ($request->get('pane') == 'gerrit_servers_admin') {
         return new Git_AdminGerritController($this->csrf, $this->gerrit_server_factory);
     } else {
         return new Git_AdminMirrorController($this->csrf, $this->git_mirror_mapper, $this->git_mirror_resource_restrictor, $this->project_manager, $this->git_mirror_manifest_manager, $this->git_system_event_manager);
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:AdminRouter.class.php

示例6: enhanceRedirect

 protected function enhanceRedirect(Codendi_Request $request)
 {
     $from_aid = $request->get('from_aid');
     if ($from_aid != null) {
         $this->redirect->query_parameters['from_aid'] = $from_aid;
     }
     parent::enhanceRedirect($request);
 }
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:8,代码来源:EditRenderer.class.php

示例7: update

 public function update(Codendi_Request $request, Response $response)
 {
     $emailgateway_mode = $request->get('emailgateway_mode');
     if ($emailgateway_mode && $this->config->setEmailgatewayMode($emailgateway_mode)) {
         $response->addFeedback(Feedback::INFO, $GLOBALS['Language']->getText('admin_main', 'successfully_updated'));
     }
     $response->redirect($_SERVER['REQUEST_URI']);
 }
开发者ID:pkdevbox,项目名称:tuleap,代码行数:8,代码来源:TrackerPluginConfigController.php

示例8: getUGroup

 private function getUGroup(Codendi_Request $request)
 {
     $ugroup_id = $request->getValidated('ugroup_id', 'uint', 0);
     if (!$ugroup_id) {
         exit_error($GLOBALS['Language']->getText('global', 'error'), 'The ugroup ID is missing');
     }
     return $this->ugroup_manager->getById($ugroup_id);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:UGroupRouter.class.php

示例9: sendResponse

 private function sendResponse(Codendi_Request $request, $feedback_level, $message, $unsubscribe)
 {
     if ($request->isAjax()) {
         $this->sendAjaxResponse($unsubscribe, $message);
         return;
     }
     $GLOBALS['Response']->addFeedback($feedback_level, $message);
     $GLOBALS['Response']->redirect($this->artifact->getUri());
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:ArtifactNotificationSubscriber.class.php

示例10: update

 public function update(Codendi_Request $request, Response $response)
 {
     $emailgateway_mode = $request->get('emailgateway_mode');
     if ($emailgateway_mode && $this->config->setEmailgatewayMode($emailgateway_mode)) {
         $response->addFeedback(Feedback::INFO, $GLOBALS['Language']->getText('plugin_tracker_config', 'successfully_updated'));
     }
     $this->event_manager->processEvent(Event::UPDATE_ALIASES, null);
     $response->redirect($_SERVER['REQUEST_URI']);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:TrackerPluginConfigController.php

示例11: getRequestedView

 /**
  * @return Tracker_Artifact_View_View
  */
 private function getRequestedView(Codendi_Request $request)
 {
     if (isset($this->views[$request->get('view')])) {
         return $this->views[$request->get('view')];
     } else {
         list(, $first_view) = each($this->views);
         return $first_view;
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:12,代码来源:ViewCollection.class.php

示例12: route

 public function route(Codendi_Request $request)
 {
     $controller = new Project_OneStepCreation_OneStepCreationController($request, $this->project_manager, $this->custom_description_factory, $this->trove_cat_factory);
     if ($request->get('create_project')) {
         $controller->create();
     } else {
         $controller->index();
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:OneStepCreationRouter.class.php

示例13: execute

 /**
  * @see Cardwall_OnTop_Config_Command::execute()
  */
 public function execute(Codendi_Request $request)
 {
     if ($request->get('add_mapping_on')) {
         $new_mapping_tracker = $this->tracker_factory->getTrackerById($request->get('add_mapping_on'));
         if ($new_mapping_tracker && $this->dao->create($this->tracker->getId(), $new_mapping_tracker->getId(), null)) {
             $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_mapping_added', array($new_mapping_tracker->getName())));
         }
     }
 }
开发者ID:nterray,项目名称:tuleap,代码行数:12,代码来源:CreateMappingField.class.php

示例14: updateGerritServers

 private function updateGerritServers(Codendi_Request $request)
 {
     $request_gerrit_servers = $request->get('gerrit_servers');
     if (is_array($request_gerrit_servers)) {
         $this->csrf->check();
         $this->fetchGerritServers();
         $this->updateServers($request_gerrit_servers);
         $GLOBALS['Response']->redirect('/plugins/git/admin/?pane=gerrit_servers_admin');
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:AdminGerritController.class.php

示例15: getSendNotificationsFromRequest

 /**
  * @return boolean
  */
 private function getSendNotificationsFromRequest(Codendi_Request $request)
 {
     $send_notifications = false;
     if ($request->exist('notify')) {
         if ($request->get('notify') == 'ok') {
             $send_notifications = true;
         }
     }
     return $send_notifications;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:13,代码来源:MasschangeUpdater.class.php


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