当前位置: 首页>>代码示例>>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;未经允许,请勿转载。