本文整理汇总了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;
}
示例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;
}