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


PHP Tiki_Profile::getPreferences方法代碼示例

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


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

示例1: doInstall

 private function doInstall(Tiki_Profile $profile)
 {
     global $tikilib;
     $this->installed[$profile->url] = $profile;
     foreach ($profile->getPreferences() as $pref => $value) {
         $tikilib->set_preference($pref, $value);
     }
     foreach ($profile->getObjects() as $object) {
         $this->getInstallHandler($object)->install();
     }
     $permissions = $profile->getPermissions();
     $profile->replaceReferences($permissions);
     foreach ($permissions as $groupName => $info) {
         $this->setupGroup($groupName, $info['general'], $info['permissions'], $info['objects']);
     }
 }
開發者ID:Kraiany,項目名稱:kraiany_site_docker,代碼行數:16,代碼來源:installlib.php

示例2: doInstall

 private function doInstall(Tiki_Profile $profile)
 {
     $this->setFeedback(tra('Applying profile') . ': ' . $profile->profile);
     $this->installed[$profile->getProfileKey()] = $profile;
     $preferences = $profile->getPreferences();
     $leftovers = $this->applyPreferences($profile, $preferences, true);
     require_once 'lib/setup/events.php';
     tiki_setup_events();
     foreach ($profile->getObjects() as $object) {
         $installer = $this->getInstallHandler($object);
         $installer->install();
         $description = $object->getDescription();
         $installer->replaceReferences($description);
         $this->setFeedback(tra('Added (or modified)') . ': ' . $description);
     }
     $groupMap = $profile->getGroupMap();
     $profile->replaceReferences($groupMap, $this->userData);
     $permissions = $profile->getPermissions($groupMap);
     $profile->replaceReferences($permissions, $this->userData);
     foreach ($permissions as $groupName => $info) {
         $this->setFeedback(tra('Group changed (or modified)') . ': ' . $groupName);
         $this->setupGroup($groupName, $info['general'], $info['permissions'], $info['objects'], $groupMap);
     }
     $this->applyPreferences($profile, $leftovers);
     tiki_setup_events();
 }
開發者ID:linuxwhy,項目名稱:tiki-1,代碼行數:26,代碼來源:Installer.php

示例3: doInstall

 private function doInstall(Tiki_Profile $profile)
 {
     global $tikilib, $prefs;
     $this->setFeedback(tra('Applying profile') . ': ' . $profile->profile);
     $this->installed[$profile->getProfileKey()] = $profile;
     $preferences = $profile->getPreferences();
     $profile->replaceReferences($preferences, $this->userData);
     foreach ($preferences as $pref => $value) {
         if ($this->allowedGlobalPreferences === false || in_array($pref, $this->allowedGlobalPreferences)) {
             global $prefslib;
             include_once 'lib/prefslib.php';
             $pinfo = $prefslib->getPreference($pref);
             if (!empty($pinfo['separator']) && !is_array($value)) {
                 $value = explode($pinfo['separator'], $value);
             }
             if ($prefs[$pref] != $value) {
                 $this->setFeedback(tra('Preference set') . ': ' . $pref . '=' . $value);
             }
             $tikilib->set_preference($pref, $value);
         }
     }
     require_once 'lib/setup/events.php';
     tiki_setup_events();
     foreach ($profile->getObjects() as $object) {
         $this->getInstallHandler($object)->install();
         $this->setFeedback(tra('Added (or modified)') . ': ' . $object->getDescription());
     }
     $groupMap = $profile->getGroupMap();
     $profile->replaceReferences($groupMap, $this->userData);
     $permissions = $profile->getPermissions($groupMap);
     $profile->replaceReferences($permissions, $this->userData);
     foreach ($permissions as $groupName => $info) {
         $this->setFeedback(tra('Group changed (or modified)') . ': ' . $groupName);
         $this->setupGroup($groupName, $info['general'], $info['permissions'], $info['objects'], $groupMap);
     }
     tiki_setup_events();
 }
開發者ID:railfuture,項目名稱:tiki-website,代碼行數:37,代碼來源:installlib.php


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