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


PHP SkinTemplate::getDefaultModules方法代码示例

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


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

示例1: getDefaultModules

 /**
  * Returns the javascript entry modules to load. Only modules that need to
  * be overriden or added conditionally should be placed here.
  * @return array
  */
 public function getDefaultModules()
 {
     $modules = parent::getDefaultModules();
     // flush unnecessary modules
     $modules['content'] = array();
     $modules['legacy'] = array();
     // Add minerva specific modules
     $modules['head'] = 'mobile.head';
     // Define all the modules that should load on the mobile site and their dependencies.
     // Do not add mobules here.
     $modules['stable'] = 'skins.minerva.scripts';
     // Doing this unconditionally, prevents the desktop watchstar from ever leaking into mobile view.
     $modules['watch'] = array();
     if ($this->isAllowedPageAction('watch')) {
         // Explicitly add the mobile watchstar code.
         $modules['watch'] = array('mobile.watchstar.init');
     }
     if ($this->isAllowedPageAction('edit')) {
         $modules['editor'] = array('mobile.editor');
     }
     // add the browse module if the page has a tag assigned to it
     if ($this->getBrowseTags($this->getTitle())) {
         $modules['browse'] = array('mobile.browse');
     }
     $modules['context'] = $this->getContextSpecificModules();
     if ($this->isMobileMode) {
         $modules['toggling'] = array('mobile.toggling');
         $modules['eventlogging'] = array('mobile.loggingSchemas');
     }
     $modules['site'] = 'mobile.site';
     // FIXME: Upstream?
     Hooks::run('SkinMinervaDefaultModules', array($this, &$modules));
     return $modules;
 }
开发者ID:GoProjectOwner,项目名称:mediawiki-extensions-MobileFrontend,代码行数:39,代码来源:SkinMinerva.php

示例2: getDefaultModules

 /**
  * Returns the javascript entry modules to load. Only modules that need to
  * be overriden or added conditionally should be placed here.
  * @return array
  */
 public function getDefaultModules()
 {
     $modules = parent::getDefaultModules();
     // flush unnecessary modules
     $modules['content'] = array();
     $modules['legacy'] = array();
     $modules['top'] = 'skins.minerva.scripts.top';
     // Define all the modules that should load on the mobile site and their dependencies.
     // Do not add mobules here.
     $modules['stable'] = 'skins.minerva.scripts';
     // Doing this unconditionally, prevents the desktop watchstar from ever leaking into mobile view.
     $modules['watch'] = array();
     if ($this->isAllowedPageAction('watch')) {
         // Explicitly add the mobile watchstar code.
         $modules['watch'] = array('skins.minerva.watchstar');
     }
     if ($this->isAllowedPageAction('edit')) {
         $modules['editor'] = array('skins.minerva.editor');
     }
     $modules['context'] = $this->getContextSpecificModules();
     if ($this->isMobileMode) {
         $modules['toggling'] = array('skins.minerva.toggling');
     }
     $modules['site'] = 'mobile.site';
     // FIXME: Upstream?
     Hooks::run('SkinMinervaDefaultModules', array($this, &$modules));
     return $modules;
 }
开发者ID:felixonmars,项目名称:mediawiki-extensions-MobileFrontend,代码行数:33,代码来源:SkinMinerva.php


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