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


PHP SkinTemplate::prepareQuickTemplate方法代码示例

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


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

示例1: prepareQuickTemplate

 /**
  * initialize various variables and generate the template
  * @return QuickTemplate
  */
 protected function prepareQuickTemplate()
 {
     $appleTouchIcon = $this->getConfig()->get('AppleTouchIcon');
     $out = $this->getOutput();
     // add head items
     if ($appleTouchIcon !== false) {
         $out->addLink(array('rel' => 'apple-touch-icon', 'href' => $appleTouchIcon));
     }
     $out->addMeta('viewport', 'initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, ' . 'maximum-scale=5.0, width=device-width');
     // Generate skin template
     $tpl = parent::prepareQuickTemplate();
     // Set whether or not the page content should be wrapped in div.content (for
     // example, on a special page)
     $tpl->set('unstyledContent', $out->getProperty('unstyledContent'));
     // Set the links for the main menu
     $tpl->set('menu_data', $this->getMenuData());
     // Set the links for page secondary actions
     $tpl->set('secondary_actions', $this->getSecondaryActions($tpl));
     // Construct various Minerva-specific interface elements
     $this->preparePageContent($tpl);
     $this->prepareHeaderAndFooter($tpl);
     $this->prepareMenuButton($tpl);
     $this->prepareBanners($tpl);
     $this->prepareWarnings($tpl);
     $this->preparePageActions($tpl);
     $this->prepareUserButton($tpl);
     $this->prepareLanguages($tpl);
     return $tpl;
 }
开发者ID:felixonmars,项目名称:mediawiki-extensions-MobileFrontend,代码行数:33,代码来源:SkinMinerva.php

示例2: prepareQuickTemplate

 /**
  * initialize various variables and generate the template
  * @return QuickTemplate
  */
 protected function prepareQuickTemplate()
 {
     $appleTouchIcon = $this->getConfig()->get('AppleTouchIcon');
     $out = $this->getOutput();
     // add head items
     if ($appleTouchIcon !== false) {
         $out->addHeadItem('touchicon', Html::element('link', array('rel' => 'apple-touch-icon', 'href' => $appleTouchIcon)));
     }
     $out->addHeadItem('viewport', Html::element('meta', array('name' => 'viewport', 'content' => 'initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, ' . 'maximum-scale=5.0, width=device-width')));
     // Generate skin template
     $tpl = parent::prepareQuickTemplate();
     // Set whether or not the page content should be wrapped in div.content (for
     // example, on a special page)
     $tpl->set('unstyledContent', $out->getProperty('unstyledContent'));
     // Set the links for the main menu
     $tpl->set('menu_data', $this->getMenuData());
     // Set the links for page secondary actions
     $tpl->set('secondary_actions', $this->getSecondaryActions($tpl));
     // Construct various Minerva-specific interface elements
     $this->preparePageContent($tpl);
     $this->prepareHeaderAndFooter($tpl);
     $this->prepareMenuButton($tpl);
     $this->prepareBanners($tpl);
     $this->prepareWarnings($tpl);
     $this->preparePageActions($tpl);
     $this->prepareUserButton($tpl);
     $this->prepareLanguages($tpl);
     if ($this->isMenuEnabled) {
         $templateParser = new TemplateParser(__DIR__ . '/../../resources/skins.minerva.scripts/');
         $tpl->set('menuhtml', $templateParser->processTemplate('menu', $tpl->data['menu_data']));
     } else {
         $tpl->set('menuhtml', '');
     }
     return $tpl;
 }
开发者ID:jdlrobson,项目名称:MinervaNeue,代码行数:39,代码来源:SkinMinervaNeue.php

示例3: prepareQuickTemplate

 /**
  * initialize various variables and generate the template
  * @return QuickTemplate
  */
 protected function prepareQuickTemplate()
 {
     $appleTouchIcon = $this->getConfig()->get('AppleTouchIcon');
     $out = $this->getOutput();
     // add head items
     if ($appleTouchIcon !== false) {
         $out->addHeadItem('touchicon', Html::element('link', array('rel' => 'apple-touch-icon', 'href' => $appleTouchIcon)));
     }
     $out->addHeadItem('viewport', Html::element('meta', array('name' => 'viewport', 'content' => 'initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, ' . 'maximum-scale=5.0, width=device-width')));
     if ($this->isMobileMode) {
         // Customize page content for mobile view, e.g. add togglable sections, filter
         // out various elements.
         // We do this before executing parent::prepareQuickTemplate() since the parent
         // overwrites $out->mBodytext, adding an mw-content-text div which is
         // redundant to our own content div. By defining the bodytext HTML before
         // $out->mBodytext is overwritten, we avoid including the mw-content-text div.
         // FIXME: Git rid of our content div and consolidate this line with the other
         // isMobileMode lines below. This will bring us more in line with core DOM.
         $html = ExtMobileFrontend::DOMParse($out);
     }
     // Generate skin template
     $tpl = parent::prepareQuickTemplate();
     // Set whether or not the page content should be wrapped in div.content (for
     // example, on a special page)
     $tpl->set('unstyledContent', $out->getProperty('unstyledContent'));
     // Set the links for the main menu
     $tpl->set('menu_data', $this->getMenuData());
     // Set the links for page secondary actions
     $tpl->set('secondary_actions', $this->getSecondaryActions($tpl));
     // Construct various Minerva-specific interface elements
     $this->preparePageContent($tpl);
     $this->prepareHeaderAndFooter($tpl);
     $this->prepareMenuButton($tpl);
     $this->prepareBanners($tpl);
     $this->prepareWarnings($tpl);
     $this->preparePageActions($tpl);
     $this->prepareUserButton($tpl);
     $this->prepareLanguages($tpl);
     // Perform a few extra changes if we are in mobile mode
     if ($this->isMobileMode) {
         // Set our own bodytext that has been filtered by MobileFormatter
         $tpl->set('bodytext', $html);
         // Construct mobile-friendly footer
         $this->prepareMobileFooterLinks($tpl);
     }
     return $tpl;
 }
开发者ID:GoProjectOwner,项目名称:mediawiki-extensions-MobileFrontend,代码行数:51,代码来源:SkinMinerva.php


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