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


PHP ProjectManager::getProject方法代码示例

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


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

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

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

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

示例4: process

 public function process()
 {
     foreach ($this->getProjectIdsFromParameters() as $project_id) {
         $project = $this->project_manager->getProject($project_id);
         if ($project && !$project->isError()) {
             $this->logger->debug('Update configuration for project ' . $project->getID());
             $this->gitolite_driver->dumpProjectRepoConf($project);
         }
     }
     $this->system_event_manager->queueGrokMirrorGitoliteAdminUpdate();
     $this->done();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:12,代码来源:SystemEvent_GIT_PROJECTS_UPDATE.class.php

示例5: create

 /**
  * Create a new project
  * 
  * $data['project']['form_unix_name']
  * $data['project']['form_full_name']
  * $data['project']['form_license']
  * $data['project']['form_license_other']
  * $data['project']['form_short_description']
  * $data['project']['built_from_template']
  * $data['project']['is_test']
  * $data['project']['is_public']
  * $data['project']["form_".$descfieldsinfos[$i]["group_desc_id"]]
  * foreach($data['project']['trove'] as $root => $values);
  * $data['project']['services'][$arr['service_id']]['is_used'];
  * $data['project']['services'][$arr['service_id']]['server_id'];
  * 
  * @param String $shortName
  * @param String $publicName
  * @param Array $data
  * 
  * @return Project
  */
 public function create($shortName, $publicName, $data)
 {
     if (!$this->ruleShortName->isValid($shortName)) {
         throw new Project_InvalidShortName_Exception($this->ruleShortName->getErrorMessage());
     }
     $data['project']['form_unix_name'] = $shortName;
     if (!$this->ruleFullName->isValid($publicName)) {
         throw new Project_InvalidFullName_Exception($this->ruleFullName->getErrorMessage());
     }
     $data['project']['form_full_name'] = $publicName;
     $id = $this->create_project($data);
     if ($id) {
         return $this->projectManager->getProject($id);
     }
     throw new Project_Creation_Exception();
 }
开发者ID:nterray,项目名称:tuleap,代码行数:38,代码来源:ProjectCreator.class.php

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

示例7: getMatchingProjectsValues

 private function getMatchingProjectsValues(array $results)
 {
     $projects = array();
     if (isset($results['terms'])) {
         foreach ($results['terms'] as $result) {
             $project = $this->project_manager->getProject($result['term']);
             if ($this->isProjectValid($project)) {
                 $checked = isset($this->submitted_facets[self::IDENTIFIER]) && in_array($project->getGroupId(), $this->submitted_facets[self::IDENTIFIER]);
                 $projects[] = new ElasticSearch_SearchResultProjectsFacet($project, $result['count'], $checked);
                 $this->incrementCountMyProjects($project, $result['count']);
             }
             $this->matching_project_ids[] = $project->getID();
         }
     }
     usort($projects, array($this, 'sortProjects'));
     return $projects;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:17,代码来源:SearchResultProjectsFacetCollection.class.php

示例8: isUgroupUsed

 public function isUgroupUsed($ugroup_id, $project_id)
 {
     $project = $this->project_manager->getProject($project_id);
     if (!$project->usesWiki()) {
         return false;
     }
     return $this->permission_manager->isUgroupUsedByWikiService($ugroup_id, $project_id);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:PermissionsManager.class.php

示例9: fetchAllProjectsConcernedByAMirror

 public function fetchAllProjectsConcernedByAMirror(Git_Mirror_Mirror $mirror)
 {
     $projects = array();
     foreach ($this->dao->fetchAllProjectIdsConcernedByAMirror($mirror->id) as $row) {
         $projects[] = $this->project_manager->getProject($row['project_id']);
     }
     return $projects;
 }
开发者ID:LouisRenWeiWei,项目名称:tuleap,代码行数:8,代码来源:MirrorDataMapper.class.php

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

示例11: initFileModule

 private function initFileModule($group_id)
 {
     $result = db_query("INSERT INTO filemodule (group_id,module_name) VALUES ('{$group_id}','" . $this->projectManager->getProject($group_id)->getUnixName() . "')");
     if (!$result) {
         list($host, $port) = explode(':', $GLOBALS['sys_default_domain']);
         exit_error($GLOBALS['Language']->getText('global', 'error'), $GLOBALS['Language']->getText('register_confirmation', 'ins_file_fail', array($host, db_error())));
     }
 }
开发者ID:superlinger,项目名称:tuleap,代码行数:8,代码来源:ProjectCreator.class.php

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

示例13: getServices

 /**
  * @return array
  */
 private function getServices()
 {
     $services = array();
     $project = $this->project_manager->getProject($this->getTemplateId());
     foreach ($project->getServices() as $service) {
         $id = $service->getId();
         $services[$id]['is_used'] = $service->isUsed();
     }
     return $services;
 }
开发者ID:AdriandeCita,项目名称:tuleap,代码行数:13,代码来源:OneStepCreationRequest.class.php

示例14: getProjectIfUserIsAdmin

 /**
  * Return a Project is the given user is authorized to administrate it
  * 
  * @param Integer $groupId
  * @param String  $sessionKey
  * 
  * @return Project
  */
 private function getProjectIfUserIsAdmin($groupId, $sessionKey)
 {
     $project = $this->projectManager->getProject($groupId);
     if ($project && !$project->isError()) {
         if ($this->isRequesterAdmin($sessionKey, $project->getID())) {
             return $project;
         }
         throw new SoapFault('3201', 'Permission denied: need to be project admin.');
     }
     throw new SoapFault('3000', "Invalid project id");
 }
开发者ID:bamboolsu,项目名称:tuleap,代码行数:19,代码来源:Project_SOAPServer.class.php

示例15: createTrackerStructure

 private function createTrackerStructure(PFUser $user, $project_id, $tv3_id, $tracker_name, $tracker_description, $tracker_short_name)
 {
     $project = $this->project_manager->getProject($project_id);
     $this->logger->info('--> Migrate structure ');
     $new_tracker = $this->tracker_factory->createFromTV3($user, $tv3_id, $project, $tracker_name, $tracker_description, $tracker_short_name);
     if (!$new_tracker) {
         throw new Tracker_Exception_Migration_StructureCreationException($tracker_name, $tv3_id);
     }
     $this->logger->info('<-- Structure migrated ' . PHP_EOL);
     return $new_tracker->getId();
 }
开发者ID:ndjido,项目名称:tuleap,代码行数:11,代码来源:MigrationManager.php


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