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


PHP ProjectManager类代码示例

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


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

示例1: __construct

 /**
  * Instanciates a new controller.
  *
  * TODO:
  *   - pass $request to actions (e.g. show).
  *
  * @param Codendi_Request           $request
  * @param PlanningFactory           $planning_factory
  * @param Planning_MilestoneFactory $milestone_factory
  */
 public function __construct(Codendi_Request $request, Planning_MilestoneFactory $milestone_factory, ProjectManager $project_manager, Planning_VirtualTopMilestonePaneFactory $top_milestone_pane_factory)
 {
     parent::__construct('agiledashboard', $request);
     $this->milestone_factory = $milestone_factory;
     $this->top_milestone_pane_factory = $top_milestone_pane_factory;
     $this->project = $project_manager->getProject($request->get('group_id'));
 }
开发者ID:ansarbek,项目名称:tuleap,代码行数:17,代码来源:VirtualTopMilestoneController.class.php

示例2: __construct

 /**
  * Instanciates a new controller.
  *
  * TODO:
  *   - pass $request to actions (e.g. show).
  *
  * @param Codendi_Request           $request
  * @param PlanningFactory           $planning_factory
  * @param Planning_MilestoneFactory $milestone_factory
  */
 public function __construct(Codendi_Request $request, Planning_MilestoneFactory $milestone_factory, ProjectManager $project_manager, Planning_MilestonePaneFactory $pane_factory, AgileDashboard_Milestone_Pane_PanePresenterBuilderFactory $pane_presenter_builder_factory)
 {
     parent::__construct('agiledashboard', $request);
     $this->milestone_factory = $milestone_factory;
     $this->pane_factory = $pane_factory;
     $this->pane_presenter_builder_factory = $pane_presenter_builder_factory;
     $this->project = $project_manager->getProject($request->get('group_id'));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:18,代码来源:MilestoneController.class.php

示例3: __construct

 public function __construct(array $hit, ProjectManager $project_manager)
 {
     $project = $project_manager->getProject($hit['fields']['group_id']);
     $this->item_title = $hit['fields']['title'];
     $this->url = '/plugins/docman/?group_id=' . $hit['fields']['group_id'] . '&id=' . $hit['fields']['id'] . '&action=details';
     $this->permissions = implode(', ', $hit['fields']['permissions']);
     $this->project_name = $project->getPublicName();
     $this->highlight = isset($hit['highlight']['file']) ? array_shift($hit['highlight']['file']) : '';
 }
开发者ID:nickl-,项目名称:tuleap,代码行数:9,代码来源:SearchResult.class.php

示例4: update

 /**
  * Select a PM from its username or password
  * 
  * @param ProjectManager $pm
  * @return array the selected row in the db
  */
 public function update($pm)
 {
     $sql = $this->dao->prepare("UPDATE project_manager set `password` = :password WHERE `pm_id` = :pm_id;");
     $sql->bindValue(":pm_id", $pm->pm_id(), \PDO::PARAM_INT);
     $sql->bindValue(":password", $pm->password(), \PDO::PARAM_STR);
     try {
         return $sql->execute();
     } catch (Exception $exc) {
         echo $exc->getTraceAsString();
     }
 }
开发者ID:tymiles003,项目名称:FieldWorkManager,代码行数:17,代码来源:LoginDal.php

示例5: __construct

 public function __construct(array $results, ProjectManager $project_manager, array $submitted_facets)
 {
     if (isset($results['terms'])) {
         foreach ($results['terms'] as $result) {
             $project = $project_manager->getProject($result['term']);
             if ($project && !$project->isError()) {
                 $checked = isset($submitted_facets['group_id']) && in_array($project->getGroupId(), $submitted_facets['group_id']);
                 $this->facets[] = new ElasticSearch_SearchResultProjectsFacet($project, $result['count'], $checked);
             }
         }
     }
 }
开发者ID:nterray,项目名称:tuleap,代码行数:12,代码来源:SearchResultProjectsFacetCollection.class.php

示例6: aCreationValidator

    protected function aCreationValidator($request_data, $required_custom_descriptions) {
        $request = aRequest()->withParams($request_data)->build();
        $creation_request = new Project_OneStepCreation_OneStepCreationRequest($request, ProjectManager::instance());
        $validator = new Project_OneStepCreation_OneStepCreationValidator($creation_request, $required_custom_descriptions);

        return $validator;
    }
开发者ID:rinodung,项目名称:tuleap,代码行数:7,代码来源:OneStepProjectCreationValidatorTest.php

示例7: __construct

 public function __construct()
 {
     $this->project_manager = ProjectManager::instance();
     $this->user_manager = UserManager::instance();
     $this->project_helper = new \DataInit\ProjectHelper();
     $GLOBALS['Language'] = new BaseLanguage('en_US', 'en_US');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:GuineaPig.php

示例8: doCreate

 private function doCreate()
 {
     $data = $this->creation_request->getProjectValues();
     require_once 'www/project/create_project.php';
     $group_id = create_project($data);
     return $this->project_manager->getProject($group_id);
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:7,代码来源:OneStepCreationController.class.php

示例9: process

 /**
  * Execute action
  * 
  * @see src/common/system_event/SystemEvent::process()
  */
 public function process()
 {
     $user_ids = $this->getParametersAsArray();
     $project_ids = array();
     // Get all projects the user is member of (project member or user group member)
     $um = $this->getUserManager();
     foreach ($user_ids as $user_id) {
         $user = $um->getUserById($user_id);
         if ($user && ($user->isActive() || $user->isRestricted())) {
             $prjs = $user->getAllProjects();
             foreach ($prjs as $pid) {
                 if (!isset($project_ids[$pid])) {
                     $project_ids[$pid] = $pid;
                 }
             }
         }
     }
     // Update SVNAccessFile of projects
     $backendSVN = $this->getBackendSVN();
     foreach ($project_ids as $project_id) {
         $project = $this->project_manager->getProject($project_id);
         if ($project && $this->ldap_project_manager->hasSVNLDAPAuth($project->getId())) {
             $backendSVN->updateProjectSVNAccessFile($project);
         }
     }
     $this->done();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:32,代码来源:SystemEvent_PLUGIN_LDAP_UPDATE_LOGIN.class.php

示例10: getProjectFromRepositoryPath

 /**
  * Returns the Project that match the given string
  *
  * @param String $repository_path
  * @return Project
  * @throws Exception
  */
 public function getProjectFromRepositoryPath($repository_path)
 {
     $unix_group_name = substr($repository_path, strlen(ForgeConfig::get('svn_prefix')) + 1);
     $project = $this->project_manager->getProjectByUnixName($unix_group_name);
     if ($project && !$project->isError() && !$project->isDeleted()) {
         return $project;
     }
     throw new Exception('Invalid project');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:16,代码来源:SVN_Hooks.class.php

示例11: renameProject

 public function renameProject($old_name, $new_name)
 {
     $git_modifications = new Git_Gitolite_GitModifications();
     $project = $this->project_manager->getProjectByUnixName($new_name);
     $this->moveProjectFiles($old_name, $new_name, $git_modifications, $project);
     $this->modifyProjectConf($old_name, $new_name, $git_modifications, $project);
     $this->modifyIncludersConf($old_name, $new_name, $git_modifications, $project);
     return $git_modifications;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:GitoliteConfWriter.php

示例12: getProjectsAuthorizingTokens

 /**
  * @return Project[]
  */
 public function getProjectsAuthorizingTokens()
 {
     $projects = array();
     foreach ($this->dao->getProjectsAuthorizingTokens() as $row) {
         $project_id = $row['project_id'];
         $projects[] = $this->project_manager->getProject($project_id);
     }
     return $projects;
 }
开发者ID:ansarbek,项目名称:tuleap,代码行数:12,代码来源:SVN_TokenUsageManager.php

示例13: migrateProject

 private function migrateProject($project_to_migrate)
 {
     $project = $this->project_manager->getProjectFromAutocompleter($project_to_migrate);
     if ($project && $this->wiki_migrator->canMigrate($project)) {
         $this->system_event_manager->createEvent(SystemEvent_PHPWIKI_SWITCH_TO_PLUGIN::NAME, $project->getId(), SystemEvent::PRIORITY_HIGH);
         $GLOBALS['Response']->addFeedback(Feedback::INFO, $GLOBALS['Language']->getText('plugin_phpwiki', 'allowed_project_allow_project'));
     } else {
         $this->sendUpdateProjectListError();
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:PHPWikiAdminController.class.php

示例14: recursivelyCreateUmbrellaProjects

 /**
  * Creates the Umbrella Projects of a given project
  * @param Git_RemoteServer_GerritServer[] $gerrit_servers
  * @param Project $project
  */
 public function recursivelyCreateUmbrellaProjects(array $gerrit_servers, Project $project)
 {
     $parent_project = $this->project_manager->getParentProject($project->getID());
     $this->createProjectOnServers($gerrit_servers, $project);
     if (!$parent_project) {
         $this->resetProjectInheritanceOnServers($gerrit_servers, $project);
         return;
     }
     $this->recursivelyCreateUmbrellaProjects($gerrit_servers, $parent_project);
     $this->setProjectInheritanceOnServers($gerrit_servers, $project, $parent_project);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:16,代码来源:UmbrellaProjectManager.class.php

示例15: allowSVNTokensForProject

 private function allowSVNTokensForProject($project_to_migrate)
 {
     $project = $this->project_manager->getProjectFromAutocompleter($project_to_migrate);
     if ($project && $this->token_manager->canAuthorizeTokens($project)) {
         $this->token_manager->setProjectAuthorizesTokens($project);
         $this->event_manager->processEvent(Event::SVN_AUTHORIZE_TOKENS, array('group_id' => $project->getID()));
         $GLOBALS['Response']->addFeedback(Feedback::INFO, $GLOBALS['Language']->getText('svn_tokens', 'allowed_project_allow_project'));
     } else {
         $this->sendUpdateProjectListError();
     }
 }
开发者ID:ansarbek,项目名称:tuleap,代码行数:11,代码来源:SVN_Admin_Controller.php


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