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


PHP Codendi_Request::get方法代码示例

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


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

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

示例2: register_valid

function register_valid(Codendi_Request $request)
{
    global $Language;
    if (!$request->existAndNonEmpty('Update')) {
        return false;
    }
    if (!$request->existAndNonEmpty('user_id')) {
        $GLOBALS['Response']->addFeedback('error', $Language->getText('admin_user_changepw', 'error_userid'));
        return false;
    }
    if (!$request->existAndNonEmpty('form_pw')) {
        $GLOBALS['Response']->addFeedback('error', $Language->getText('admin_user_changepw', 'error_nopasswd'));
        return false;
    }
    if ($request->get('form_pw') != $request->get('form_pw2')) {
        $GLOBALS['Response']->addFeedback('error', $Language->getText('admin_user_changepw', 'error_passwd'));
        return false;
    }
    $errors = array();
    if (!account_pwvalid($request->get('form_pw'), $errors)) {
        foreach ($errors as $e) {
            $GLOBALS['Response']->addFeedback('error', $e);
        }
        return false;
    }
    // if we got this far, it must be good
    $user_manager = UserManager::instance();
    $user = $user_manager->getUserById($request->get('user_id'));
    $user->setPassword($request->get('form_pw'));
    if (!$user_manager->updateDb($user)) {
        $GLOBALS['Response']->addFeedback(Feedback::ERROR, $Language->getText('admin_user_changepw', 'error_update'));
        return false;
    }
    return true;
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:35,代码来源:user_changepw.php

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

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

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

示例6: linkArtifact

 private function linkArtifact(PFUser $current_user, Tracker_Artifact $new_artifact)
 {
     $artifact_link_id = $this->request->get('artifact-link-id');
     $source_artifact = $this->tracker_artifact_factory->getArtifactById($artifact_link_id);
     if (!$source_artifact) {
         return;
     }
     $source_artifact->linkArtifact($new_artifact->getId(), $current_user);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:CreateArtifactFromModal.class.php

示例7: getSourceArtifact

 private function getSourceArtifact()
 {
     $source_artifact = null;
     if ($this->request->get('func') == 'new-artifact-link') {
         $source_artifact = $this->artifact_factory->getArtifactById($this->request->get('id'));
     } elseif ($this->request->get('child_milestone')) {
         $source_artifact = $this->artifact_factory->getArtifactById($this->request->get('child_milestone'));
     }
     return $source_artifact;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:ArtifactParentsSelectorEventListener.class.php

示例8: display

 public function display()
 {
     $git_php_viewer = new GitViews_GitPhpViewer($this->repository, $this->controller->getPlugin()->getConfigurationParameter('gitphp_path'));
     if ($this->request->get('noheader') == 1) {
         $view = new GitViews_ShowRepo_Download($git_php_viewer);
     } else {
         $view = new GitViews_ShowRepo_Content($this->repository, $git_php_viewer, $this->request->getCurrentUser(), $this->controller, $this->url_manager, $this->driver_factory, $this->gerrit_usermanager, $this->mirror_data_mapper, $this->gerrit_servers, $this->controller->getPlugin()->getThemePath());
     }
     $view->display();
 }
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:10,代码来源:ShowRepo.class.php

示例9: route

 public function route()
 {
     if (!$this->request->getCurrentUser()->isSuperUser()) {
         $this->controller->notSiteAdmin();
     } elseif ($this->request->get('update')) {
         $this->controller->update();
     } else {
         $this->controller->index();
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:Router.php

示例10: execute

 /**
  * @see Cardwall_OnTop_Config_Command::execute()
  */
 public function execute(Codendi_Request $request)
 {
     if ($request->get('column')) {
         foreach ($request->get('column') as $id => $column_definition) {
             $column_label = $column_definition['label'];
             if (!empty($column_label) && $this->dao->save($this->tracker->getId(), $id, $column_label)) {
                 $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_column_changed', array($column_label)));
             }
         }
     }
 }
开发者ID:nterray,项目名称:tuleap,代码行数:14,代码来源:UpdateColumns.class.php

示例11: execute

 /**
  * @see Cardwall_OnTop_Config_Command::execute()
  */
 public function execute(Codendi_Request $request)
 {
     if (is_array($request->get('custom_mapping'))) {
         foreach ($request->get('custom_mapping') as $mapping_tracker_id => $is_custom) {
             $mapping_tracker = $this->tracker_factory->getTrackerById($mapping_tracker_id);
             if ($this->canDelete($is_custom, $mapping_tracker) && $this->delete($mapping_tracker)) {
                 $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_mapping_removed', array($mapping_tracker->getName())));
             }
         }
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:14,代码来源:DeleteMappingFields.class.php

示例12: __construct

 public function __construct(Codendi_Request $request)
 {
     $this->project = $request->getProject();
     $this->words = $request->get('words');
     $this->offset = intval($request->getValidated('offset', 'uint', 0));
     $this->exact = $request->getValidated('exact', 'uint', false);
     $this->trackerv3id = $request->getValidated('atid', 'uint', 0);
     $this->forum_id = $request->getValidated('forum_id', 'uint', 0);
     $this->is_ajax = $request->isAjax();
     $this->type_of_search = $request->get('type_of_search');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:11,代码来源:SearchQuery.class.php

示例13: getRedirectUrlAfterArtifactUpdate

 protected function getRedirectUrlAfterArtifactUpdate(Codendi_Request $request)
 {
     $stay = $request->get('submit_and_stay');
     $from_aid = $request->get('from_aid');
     $redirect = new Tracker_Artifact_Redirect();
     $redirect->mode = Tracker_Artifact_Redirect::STATE_SUBMIT;
     $redirect->base_url = TRACKER_BASE_URL;
     $redirect->query_parameters = $this->calculateRedirectParams($stay, $from_aid);
     if ($stay) {
         $redirect->mode = Tracker_Artifact_Redirect::STATE_STAY_OR_CONTINUE;
     }
     return $redirect;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:13,代码来源:UpdateArtifact.class.php

示例14: getScrumTitle

 private function getScrumTitle()
 {
     $old_scrum_title = $this->config_manager->getScrumTitle($this->project_id);
     $scrum_title = trim($this->request->get('scrum-title-admin'));
     if ($scrum_title !== $old_scrum_title) {
         $this->response->scrumTitleChanged();
     }
     if ($scrum_title == '') {
         $this->response->emptyScrumTitle();
         $scrum_title = $old_scrum_title;
     }
     return $scrum_title;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:13,代码来源:AgileDashboardScrumConfigurationUpdater.class.php

示例15: getKanbanTitle

 private function getKanbanTitle()
 {
     $old_kanban_title = $this->config_manager->getKanbanTitle($this->project_id);
     $kanban_title = trim($this->request->get('kanban-title-admin'));
     if ($kanban_title !== $old_kanban_title) {
         $this->response->kanbanTitleChanged();
     }
     if ($kanban_title == '') {
         $this->response->emptyKanbanTitle();
         $kanban_title = $old_kanban_title;
     }
     return $kanban_title;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:13,代码来源:AgileDashboardKanbanConfigurationUpdater.class.php


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