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


PHP Codendi_Request::getValidated方法代码示例

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


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

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

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

示例3: updateLabels

 private function updateLabels($new_access_value)
 {
     if ($new_access_value === ForgeAccess::RESTRICTED) {
         $this->manager->updateLabels(trim($this->request->getValidated('ugroup_authenticated_users', 'string', '')), trim($this->request->getValidated('ugroup_registered_users', 'string', '')));
     } else {
         $this->manager->updateLabels('', '');
     }
 }
开发者ID:pdaniel-frk,项目名称:tuleap,代码行数:8,代码来源:AdminController.php

示例4: linkWithParents

 public function linkWithParents(Codendi_Request $request, Tracker_Artifact $artifact)
 {
     $user = $request->getCurrentUser();
     $ancestors = $artifact->getAllAncestors($user);
     if (count($ancestors) == 0) {
         $artifact_id = (int) $request->getValidated('link-artifact-id', 'uint', 0);
         $source_artifact = $this->artifact_factory->getArtifactById($artifact_id);
         if ($source_artifact) {
             foreach ($source_artifact->getAllAncestors($user) as $ancestor) {
                 $ancestor->linkArtifact($artifact->getId(), $user);
             }
         }
     }
 }
开发者ID:nickl-,项目名称:tuleap,代码行数:14,代码来源:ArtifactLinker.class.php

示例5: process

 public function process(Tracker_IDisplayTrackerLayout $layout, Codendi_Request $request, PFUser $current_user)
 {
     try {
         if (!$request->isPost()) {
             $GLOBALS['Response']->addFeedback(Feedback::ERROR, 'Method must be post');
             $GLOBALS['Response']->sendStatusCode(405);
             return false;
         }
         $rule = $this->rule_manager->getRuleById($request->getValidated('id', 'uint', 0));
         $this->rule_manager->delete($this->tracker, $rule);
     } catch (Tracker_Exception $exception) {
         $GLOBALS['Response']->addFeedback(Feedback::ERROR, $exception->getMessage());
         $GLOBALS['Response']->sendStatusCode(400);
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:15,代码来源:DeleteTrigger.class.php

示例6: doCreateTracker

 public function doCreateTracker(Project $project, Codendi_Request $request)
 {
     $is_error = false;
     $new_tracker = null;
     $name = trim($request->get('name'));
     $description = trim($request->get('description'));
     $itemname = trim($request->get('itemname'));
     $atid_template = $request->getValidated('atid_template', 'uint', 0);
     // First try XML
     if ($request->existAndNonEmpty('create_mode') && $request->get('create_mode') == 'xml') {
         $vFile = new Valid_File('tracker_new_xml_file');
         $vFile->required();
         if ($request->validFile($vFile)) {
             try {
                 $user_finder = new XMLImportHelper(UserManager::instance());
                 $new_tracker = TrackerXmlImport::build($user_finder)->createFromXMLFileWithInfo($project->getID(), $_FILES["tracker_new_xml_file"]["tmp_name"], $name, $description, $itemname);
             } catch (XML_ParseException $exception) {
                 $this->displayCreateTrackerFromXMLErrors($project, $exception->getErrors(), $exception->getFileLines());
             } catch (TrackerFromXmlException $exception) {
                 $GLOBALS['Response']->addFeedback(Feedback::ERROR, $exception->getMessage());
             }
         }
     } else {
         if ($request->existAndNonEmpty('create_mode') && $request->get('create_mode') == 'tv3') {
             $atid = $request->get('tracker_new_tv3');
             $user = UserManager::instance()->getCurrentUser();
             $new_tracker = $this->getTrackerFactory()->createFromTV3($user, $atid, $project, $name, $description, $itemname);
         } else {
             if ($request->existAndNonEmpty('create_mode') && $request->get('create_mode') == 'migrate_from_tv3') {
                 $tracker_id = $request->get('tracker_new_tv3');
                 if ($this->getTV3MigrationManager()->askForMigration($project, $tracker_id, $name, $description, $itemname)) {
                     $GLOBALS['Response']->redirect(TRACKER_BASE_URL . '/?group_id=' . $project->group_id);
                 }
             } else {
                 // Otherwise tries duplicate
                 $duplicate = $this->getTrackerFactory()->create($project->getId(), -1, $atid_template, $name, $description, $itemname);
                 $new_tracker = $duplicate['tracker'];
             }
         }
     }
     if ($new_tracker) {
         $GLOBALS['Response']->redirect(TRACKER_BASE_URL . '/?group_id=' . $project->group_id . '&tracker=' . $new_tracker->id);
     } else {
         $tracker_template = $this->getTrackerFactory()->getTrackerById($atid_template);
         $this->displayCreateTracker($project, $request, $name, $description, $itemname, $tracker_template);
     }
 }
开发者ID:blestab,项目名称:tuleap,代码行数:47,代码来源:TrackerManager.class.php

示例7: routeShowPlanning

 /**
  * Routes some milestone-related requests.
  *
  * TODO:
  *   - merge into AgileDashboardRouter::route()
  *
  * @param Codendi_Request $request
  */
 public function routeShowPlanning(Codendi_Request $request)
 {
     $aid = $request->getValidated('aid', 'int', 0);
     switch ($aid) {
         case -1:
             $controller = new Planning_ArtifactCreationController($this->planning_factory, $request);
             $this->executeAction($controller, 'createArtifact');
             break;
         case 0:
             $controller = new Planning_MilestoneSelectorController($request, $this->milestone_factory);
             $this->executeAction($controller, 'show');
             /* no break */
         /* no break */
         default:
             $controller = $this->milestone_controller_factory->getMilestoneController($request);
             $action_arguments = array();
             $this->renderAction($controller, 'show', $request, $action_arguments, array('body_class' => array('agiledashboard_planning')));
     }
 }
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:27,代码来源:AgileDashboardRouter.class.php

示例8: validateCommentFormat

 /**
  * Returns HTML code to display the artifact history
  *
  * @param Codendi_Request $request The data from the user
  *
  * @return String The valid followup comment format
  */
 private function validateCommentFormat($request, $comment_format_field_name)
 {
     $default_format = Tracker_Artifact_Changeset_Comment::TEXT_COMMENT;
     $formats = array(Tracker_Artifact_Changeset_Comment::TEXT_COMMENT, Tracker_Artifact_Changeset_Comment::HTML_COMMENT);
     $comment_format = $request->getValidated($comment_format_field_name, new Valid_WhiteList($comment_format_field_name, $formats), $default_format);
     return $comment_format;
 }
开发者ID:nterray,项目名称:tuleap,代码行数:14,代码来源:Tracker_Artifact.class.php

示例9: newVersionApprovalTable

 private function newVersionApprovalTable(Codendi_Request $request, Docman_Item $item, PFUser $user)
 {
     $vImport = new Valid_WhiteList('app_table_import', array('copy', 'reset', 'empty'));
     $vImport->required();
     $import = $request->getValidated('app_table_import', $vImport, false);
     if ($import) {
         $atf = Docman_ApprovalTableFactoriesFactory::getFromItem($item);
         $atf->createTable($user->getId(), $request->get('app_table_import'));
     }
 }
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:10,代码来源:Docman_Actions.class.php

示例10: doCreateTracker

 public function doCreateTracker(Project $project, Codendi_Request $request)
 {
     $is_error = false;
     $new_tracker = null;
     $name = trim($request->get('name'));
     $description = trim($request->get('description'));
     $itemname = trim($request->get('itemname'));
     $atid_template = $request->getValidated('atid_template', 'uint', 0);
     // First try XML
     if ($request->existAndNonEmpty('create_mode') && $request->get('create_mode') == 'xml') {
         $vFile = new Valid_File('tracker_new_xml_file');
         $vFile->required();
         if ($request->validFile($vFile)) {
             $new_tracker = $this->importTracker($project, $name, $description, $itemname, $_FILES["tracker_new_xml_file"]["tmp_name"]);
         }
     } else {
         // Otherwise tries duplicate
         $duplicate = $this->getTrackerFactory()->create($project->getId(), -1, $atid_template, $name, $description, $itemname);
         $new_tracker = $duplicate['tracker'];
     }
     if ($new_tracker) {
         $GLOBALS['Response']->redirect(TRACKER_BASE_URL . '/?group_id=' . $project->group_id . '&tracker=' . $new_tracker->id);
     } else {
         $tracker_template = $this->getTrackerFactory()->getTrackerById($atid_template);
         $this->displayCreateTracker($project, $request, $name, $description, $itemname, $tracker_template);
     }
 }
开发者ID:nterray,项目名称:tuleap,代码行数:27,代码来源:TrackerManager.class.php

示例11: process

 /**
  *
  * @param Tracker_IDisplayTrackerLayout $layout
  * @param Codendi_Request               $request
  * @param User                          $current_user 
  */
 public function process(Tracker_IDisplayTrackerLayout $layout, $request, $current_user)
 {
     switch ($request->get('func')) {
         case self::FUNC_SHOW_BURNDOWN:
             try {
                 $artifact_id = $request->getValidated('src_aid', 'uint', 0);
                 $artifact = Tracker_ArtifactFactory::instance()->getArtifactById($artifact_id);
                 if (!$artifact) {
                     return false;
                 }
                 $this->fetchBurndownImage($artifact, $current_user);
             } catch (Tracker_FormElement_Field_BurndownException $e) {
                 $this->displayErrorImage($GLOBALS['Language']->getText('plugin_tracker', $e->getMessage()));
             }
             break;
         default:
             parent::process($layout, $request, $current_user);
     }
 }
开发者ID:nterray,项目名称:tuleap,代码行数:25,代码来源:Tracker_FormElement_Field_Burndown.class.php

示例12: getSourceArtifact

 private function getSourceArtifact(Codendi_Request $request, $key)
 {
     $artifact_id = (int) $request->getValidated($key, 'uint', 0);
     return $this->artifact_factory->getArtifactById($artifact_id);
 }
开发者ID:nterray,项目名称:tuleap,代码行数:5,代码来源:ArtifactLinker.class.php

示例13: process

 public function process(Codendi_Request $request)
 {
     switch ($request->get('action')) {
         case 'toggle_user_autostack_column':
             $display_preferences_controller = new Cardwall_UserPreferences_UserPreferencesController($request);
             $display_preferences_controller->toggleAutostack();
             break;
         case 'toggle_user_display_avatar':
             $display_preferences_controller = new Cardwall_UserPreferences_UserPreferencesController($request);
             $display_preferences_controller->toggleUserDisplay();
             break;
         case 'get-card':
             try {
                 $single_card_builder = new Cardwall_SingleCardBuilder($this->getConfigFactory(), new Cardwall_CardFields(UserManager::instance(), Tracker_FormElementFactory::instance()), Tracker_ArtifactFactory::instance(), PlanningFactory::build());
                 $controller = new Cardwall_CardController($request, $single_card_builder->getSingleCard($request->getCurrentUser(), $request->getValidated('id', 'uint', 0), $request->getValidated('planning_id', 'uint', 0)));
                 $controller->getCard();
             } catch (Exception $exception) {
                 $GLOBALS['Response']->addFeedback(Feedback::ERROR, $exception->getMessage());
                 $GLOBALS['Response']->sendStatusCode(400);
             }
             break;
         default:
             echo 'Hello !';
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:25,代码来源:cardwallPlugin.class.php

示例14: processBoomerangDatas

 private function processBoomerangDatas(Codendi_Request $request)
 {
     $csrf = $this->getCSRFToken();
     $csrf->check();
     $cache_folder = $this->getCacheFolder();
     if (!file_exists($cache_folder)) {
         mkdir($cache_folder, 0755, TRUE);
     }
     $page_load_time = $request->getValidated('t_done', 'uint', 0);
     $dom_content_load_time = 0;
     $boomerang_other_measures = $this->makeArrayFromStringHashTable($request->getValidated('t_other', 'string', ''));
     if (array_key_exists('boomr_fb', $boomerang_other_measures)) {
         $dom_content_load_time = (int) $boomerang_other_measures['boomr_fb'];
         $dom_content_load_time = $dom_content_load_time > 0 ? $dom_content_load_time : 0;
     }
     parse_str(parse_url($request->getValidated('u', 'string', ''), PHP_URL_QUERY), $url_parameters);
     $group_id = array_key_exists('group_id', $url_parameters) ? $url_parameters['group_id'] : null;
     $project_manager = ProjectManager::instance();
     if (!$project_manager->getProject($group_id)) {
         $group_id = 0;
     }
     $datas = array("page_loading" => $page_load_time, "dom_loading" => $dom_content_load_time);
     if ($datas["page_loading"] == 0 || $datas["dom_loading"] == 0 || $group_id == 0) {
         exit;
     }
     $boomerangDatasProcessor = new BoomerangDatasProcessor($cache_folder, $datas, $group_id);
     $boomerangDatasProcessor->handle();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:28,代码来源:boomerangPlugin.class.php


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