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


PHP Gpf_Session::getModule方法代碼示例

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


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

示例1: getRoleType

 public function getRoleType()
 {
     if ($this->roleType == '') {
         return Gpf_Session::getModule()->getRoleType();
     }
     return $this->roleType;
 }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:7,代碼來源:Info.class.php

示例2: __construct

 /**
  *
  * @param string $templateSource if $fetchType is FETCH_FILE,
  *                                  then $templateSource is template file name
  *                               if $fetchType is FETCH_TEXT,
  *                                  then $templateSource is template source as a string
  * @param string $panelName optional
  * @param string $fetchType FETCH_FILE (default) or FETCH_TEXT
  */
 public function __construct($templateSource, $panelName = '', $fetchType = self::FETCH_FILE, $theme = '')
 {
     if ($theme == '') {
         $this->theme = Gpf_Session::getAuthUser()->getTheme();
         $this->paths = Gpf_Paths::getInstance();
     } else {
         $this->theme = $theme;
         $this->paths = Gpf_Paths::getInstance()->clonePaths($theme);
     }
     if ($panelName == '') {
         $this->panel = Gpf_Session::getModule()->getPanelName();
     } else {
         $this->panel = $panelName;
     }
     $this->basePath = $this->paths->getTopPath();
     if ($fetchType == self::FETCH_FILE) {
         $this->initFetchFromFile($templateSource);
     } else {
         $this->initFetchFromText($templateSource);
     }
     $this->addPluginsDirectories();
     $this->setAndCheckCompileDir();
     $this->smarty->register_prefilter(array(&$this, 'preProcess'));
     $this->assign('basePath', $this->paths->getBaseServerUrl());
     $this->assign('imgPath', $this->getImgUrl());
     $this->assign('logoutUrl', $this->getLogoutUrl());
     Gpf_Session::getModule()->assignModuleAttributes($this);
 }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:37,代碼來源:Template.class.php

示例3: getThemes

 /**
  * @service theme read
  *
  * @return Gpf_Data_RecordSet
  */
 public function getThemes(Gpf_Rpc_Params $params)
 {
     if ($params->exists('panelName')) {
         return $this->getThemesNoRpc($params->get('panelName'));
     } else {
         return $this->getThemesNoRpc(Gpf_Session::getModule()->getPanelName(), $params->get('filterDisabled'));
     }
 }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:13,代碼來源:ThemeManager.class.php

示例4: __construct

 public function __construct($themeId = '', $panelName = '')
 {
     $this->themeId = $themeId;
     $this->panelName = $panelName;
     if ($this->themeId == '') {
         $this->themeId = Gpf_Session::getAuthUser()->getTheme();
     }
     if ($this->panelName == '') {
         $this->panelName = Gpf_Session::getModule()->getPanelName();
     }
     $this->initThemeConfig();
 }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:12,代碼來源:Theme.class.php

示例5: init

 public function init()
 {
     $this->initLanguage();
     try {
         $this->setLanguage(Gpf_Lang_Dictionary::getInstance()->load($this->getLanguage()));
     } catch (Exception $e) {
     }
     $this->loadTheme();
     if (!Gpf_Session::getModule()->isThemeValid($this->theme)) {
         $this->setTheme(Gpf_Session::getModule()->getDefaultTheme());
     }
 }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:12,代碼來源:User.class.php

示例6: logoutByURL

 /**
  *
  * @service authentication logout
  * @return Gpf_Rpc_Action
  */
 public function logoutByURL(Gpf_Rpc_Params $params)
 {
     try {
         $panelName = Gpf_Session::getModule()->getPanelName();
         Gpf_Session::getAuthUser()->logout();
         Gpf_Http::setHeader('Location', Gpf_Paths::getInstance()->getTopPath() . $panelName . '/login.php');
     } catch (Exception $e) {
         echo $this->_('Logout was not successful');
     }
 }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:15,代碼來源:Service.class.php

示例7: getTemplateSearchPaths

 public function getTemplateSearchPaths($panelName = '', $postDirectory = '', $onlyDefault = false)
 {
     $key = $panelName . '|' . $postDirectory . '|' . $onlyDefault;
     if (isset($this->cachedSearchPaths[$key])) {
         return $this->cachedSearchPaths[$key];
     }
     $paths = array();
     if ($panelName == '') {
         $panelName = $this->addTrailingSlash(Gpf_Session::getModule()->getPanelName());
     } else {
         $panelName = $this->addTrailingSlash($panelName);
     }
     foreach ($this->serverPaths as $path) {
         if ($path == $this->frameworkPath && $this->isDevelopementVersion()) {
             $panel = '';
         } else {
             $panel = $panelName;
         }
         if (!$onlyDefault && $panel != '') {
             $paths[] = $this->buildTemplatePath($path, $panel, $this->getTheme(), $postDirectory);
         }
         $paths[] = $this->buildTemplatePath($path, $panel, self::DEFAULT_THEME, $postDirectory);
     }
     $this->cachedSearchPaths[$key] = $paths;
     return $paths;
 }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:26,代碼來源:Paths.class.php


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