當前位置: 首頁>>代碼示例>>PHP>>正文


PHP project::getTemplate方法代碼示例

本文整理匯總了PHP中project::getTemplate方法的典型用法代碼示例。如果您正苦於以下問題:PHP project::getTemplate方法的具體用法?PHP project::getTemplate怎麽用?PHP project::getTemplate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在project的用法示例。


在下文中一共展示了project::getTemplate方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setReadWritePermissionsFromTemplate

 private function setReadWritePermissionsFromTemplate(array $ugroup_mapping)
 {
     $template = ProjectManager::instance()->getProject($this->project->getTemplate());
     $template_read_accesses = $this->mediawiki_manager->getReadAccessControl($template);
     $template_write_accesses = $this->mediawiki_manager->getWriteAccessControl($template);
     $this->mediawiki_manager->saveReadAccessControl($this->project, $this->getUgroupsForProjectFromMapping($template_read_accesses, $ugroup_mapping));
     $this->mediawiki_manager->saveWriteAccessControl($this->project, $this->getUgroupsForProjectFromMapping($template_write_accesses, $ugroup_mapping));
 }
開發者ID:slamj1,項目名稱:tuleap,代碼行數:8,代碼來源:MediawikiInstantiater.class.php

示例2: seedUGroupMappingFromTemplate

 private function seedUGroupMappingFromTemplate(array $ugroup_mapping)
 {
     $template = ProjectManager::instance()->getProject($this->project->getTemplate());
     $mapper = new MediawikiUserGroupsMapper(new MediawikiDao(), new User_ForgeUserGroupPermissionsDao());
     $template_mapping = $mapper->getCurrentUserGroupMapping($template);
     $new_mapping = array();
     foreach ($template_mapping as $mw_group => $tuleap_groups) {
         foreach ($tuleap_groups as $grp) {
             if ($grp < ProjectUGroup::DYNAMIC_UPPER_BOUNDARY) {
                 $new_mapping[$mw_group][] = $grp;
             } elseif (isset($ugroup_mapping[$grp])) {
                 $new_mapping[$mw_group][] = $ugroup_mapping[$grp];
             }
         }
     }
     db_query($this->seedProjectUGroupMappings($this->project->getID(), $new_mapping));
 }
開發者ID:amanikamail,項目名稱:tuleap,代碼行數:17,代碼來源:MediawikiInstantiater.class.php


注:本文中的project::getTemplate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。