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


PHP ProjectManager::activate方法代码示例

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


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

示例1: autoActivateProject

 private function autoActivateProject($group)
 {
     $auto_approval = ForgeConfig::get('sys_project_approval', 1) ? PROJECT_APPROVAL_BY_ADMIN : PROJECT_APPROVAL_AUTO;
     if ($this->force_activation || $auto_approval == PROJECT_APPROVAL_AUTO) {
         $this->projectManager->activate($group);
     }
 }
开发者ID:superlinger,项目名称:tuleap,代码行数:7,代码来源:ProjectCreator.class.php

示例2: createProject

 /**
  * Instantiates a project with user, groups, admins ...
  *
  * @param string $project_short_name
  * @param string $project_long_name
  * @param string $is_public
  * @param array  $project_members
  * @param array  $project_admins
  */
 protected function createProject($project_short_name, $project_long_name, $is_public, array $project_members, array $project_admins, array $services)
 {
     $user = $this->user_manager->getUserByUserName(self::ADMIN_USER_NAME);
     $this->user_manager->setCurrentUser($user);
     $project = $this->project_creator->create($project_short_name, $project_long_name, array('project' => array('form_short_description' => '', 'is_test' => false, 'is_public' => $is_public, 'services' => $services, 'built_from_template' => 100)));
     $this->project_manager->activate($project);
     foreach ($project_members as $project_member) {
         $this->addMembersToProject($project, $project_member);
     }
     foreach ($project_admins as $project_admin) {
         $this->addAdminToProject($project, $project_admin);
     }
     return $project;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:23,代码来源:TestDataBuilder.php

示例3: formatDataAndCreateProject

 /**
  * Create the data array needed by create_project and create the project
  * 
  * @param String $shortName
  * @param String $publicName
  * @param String $privacy
  * @param Project $template
  * 
  * @return Integer
  */
 private function formatDataAndCreateProject($shortName, $publicName, $privacy, Project $template)
 {
     $data = array('project' => array('form_license' => 'xrx', 'form_license_other' => '', 'form_short_description' => '', 'is_test' => false, 'is_public' => false, 'services' => array(), 'built_from_template' => $template->getID()));
     if ($privacy === Project::ACCESS_PUBLIC) {
         $data['project']['is_public'] = true;
     }
     foreach ($template->getServices() as $key => $service) {
         $is_used = $service->isActive() && $service->isUsed();
         $data['project']['services'][$service->getId()]['is_used'] = $is_used;
     }
     $project = $this->projectCreator->create($shortName, $publicName, $data);
     $this->projectManager->activate($project);
     return $project->getID();
 }
开发者ID:bamboolsu,项目名称:tuleap,代码行数:24,代码来源:Project_SOAPServer.class.php


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