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


PHP Media::cccCSS方法代码示例

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


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

示例1: display

 public function display()
 {
     require_once dirname(__FILE__) . '../../../../modules/designerpreview/defines.inc.php';
     Tools::safePostVars();
     // assign css_files and js_files at the very last time
     if ((Configuration::get('PS_CSS_THEME_CACHE') || Configuration::get('PS_JS_THEME_CACHE')) && is_writable(_PS_THEME_DIR_ . 'cache')) {
         // CSS compressor management
         if (Configuration::get('PS_CSS_THEME_CACHE')) {
             $this->css_files = Media::cccCSS($this->css_files);
         }
         //JS compressor management
         if (Configuration::get('PS_JS_THEME_CACHE') && !$this->useMobileTheme()) {
             $this->js_files = Media::cccJs($this->js_files);
         }
     }
     $this->context->smarty->assign(array('css_files' => $this->css_files, 'errors' => $this->errors, 'display_header' => $this->display_header, 'display_footer' => $this->display_footer));
     if ((int) implode(explode('.', _PS_VERSION_)) > 1606) {
         // For versions > 1.6.0.6
         $this->context->smarty->assign(array('js_files' => $this->getLayout() && (bool) Configuration::get('PS_JS_DEFER') ? array() : $this->js_files, 'js_defer' => (bool) Configuration::get('PS_JS_DEFER')));
     } else {
         $this->context->smarty->assign(array('js_files' => $this->getLayout() ? array() : $this->js_files));
     }
     $live_edit_content = '';
     // Don't use live edit if on mobile device
     if (!$this->useMobileTheme() && $this->checkLiveEditAccess()) {
         $live_edit_content = $this->getLiveEditFooter();
     }
     $layout = $this->getLayout();
     if ($layout) {
         if ($this->template) {
             $this->context->smarty->assign('template', $this->context->smarty->fetch($this->template) . $live_edit_content);
         } else {
             ob_start();
             $this->displayContent();
             $template = ob_get_contents();
             ob_clean();
             $this->context->smarty->assign('template', $template . $live_edit_content);
         }
         $this->smartyOutputContent($layout);
     } else {
         Tools::displayAsDeprecated('layout.tpl is missing in your theme directory');
         if ($this->display_header) {
             $this->smartyOutputContent(getThemeDir() . 'header.tpl');
         }
         if ($this->template) {
             $this->smartyOutputContent($this->template);
         } else {
             // For retrocompatibility with 1.4 controller
             $this->displayContent();
         }
         if ($this->display_footer) {
             $this->smartyOutputContent(getThemeDir() . 'footer.tpl');
         }
     }
     return true;
 }
开发者ID:tmdhosting,项目名称:TMDHosting-PrestaShop-Technology-Theme,代码行数:56,代码来源:FrontController.php

示例2: display

 public function display()
 {
     Tools::safePostVars();
     // assign css_files and js_files at the very last time
     if ((Configuration::get('PS_CSS_THEME_CACHE') || Configuration::get('PS_JS_THEME_CACHE')) && is_writable(_PS_THEME_DIR_ . 'cache')) {
         // CSS compressor management
         if (Configuration::get('PS_CSS_THEME_CACHE')) {
             $this->css_files = Media::cccCSS($this->css_files);
         }
         //JS compressor management
         if (Configuration::get('PS_JS_THEME_CACHE') && !$this->useMobileTheme()) {
             $this->js_files = Media::cccJs($this->js_files);
         }
     }
     $this->context->smarty->assign(array('css_files' => $this->css_files, 'js_files' => $this->getLayout() && (bool) Configuration::get('PS_JS_DEFER') ? array() : $this->js_files, 'js_defer' => (bool) Configuration::get('PS_JS_DEFER'), 'errors' => $this->errors, 'display_header' => $this->display_header, 'display_footer' => $this->display_footer));
     $layout = $this->getLayout();
     if ($layout) {
         if ($this->template) {
             $template = $this->context->smarty->fetch($this->template);
         } else {
             ob_start();
             $this->displayContent();
             $template = ob_get_contents();
             ob_clean();
         }
         $template = $this->context->smarty->assign('template', $template);
         $this->smartyOutputContent($layout);
     } else {
         Tools::displayAsDeprecated('layout.tpl is missing in your theme directory');
         if ($this->display_header) {
             $this->smartyOutputContent(_PS_THEME_DIR_ . 'header.tpl');
         }
         if ($this->template) {
             $this->smartyOutputContent($this->template);
         } else {
             // For retrocompatibility with 1.4 controller
             $this->displayContent();
         }
         if ($this->display_footer) {
             $this->smartyOutputContent(_PS_THEME_DIR_ . 'footer.tpl');
         }
     }
     return true;
 }
开发者ID:MacFlay,项目名称:Presta-Domowy,代码行数:44,代码来源:FrontController.php

示例3: display

 public function display()
 {
     Tools::safePostVars();
     // assign css_files and js_files at the very last time
     if ((Configuration::get('PS_CSS_THEME_CACHE') || Configuration::get('PS_JS_THEME_CACHE')) && is_writable(_PS_THEME_DIR_ . 'cache')) {
         // CSS compressor management
         if (Configuration::get('PS_CSS_THEME_CACHE')) {
             $this->css_files = Media::cccCSS($this->css_files);
         }
         //JS compressor management
         if (Configuration::get('PS_JS_THEME_CACHE')) {
             $this->js_files = Media::cccJs($this->js_files);
         }
     }
     $this->context->smarty->assign('css_files', $this->css_files);
     $this->context->smarty->assign('js_files', array_unique($this->js_files));
     $this->context->smarty->assign(array('errors' => $this->errors, 'display_header' => $this->display_header, 'display_footer' => $this->display_footer));
     $live_edit_content = '';
     // Don't use live edit if on mobile device
     if (!$this->context->getMobileDevice() && $this->checkLiveEditAccess()) {
         $live_edit_content = $this->getLiveEditFooter();
     }
     $layout = $this->getLayout();
     if ($layout) {
         if ($this->template) {
             $this->context->smarty->assign('template', $this->context->smarty->fetch($this->template) . $live_edit_content);
         } else {
             ob_start();
             $this->displayContent();
             $template = ob_get_contents();
             ob_clean();
             $this->context->smarty->assign('template', $template . $live_edit_content);
         }
         $this->smartyOutputContent($layout);
     } else {
         // BEGIN - 1.4 retrocompatibility - will be removed in 1.6
         Tools::displayAsDeprecated('layout.tpl is missing in your theme directory');
         if ($this->display_header) {
             $this->smartyOutputContent(_PS_THEME_DIR_ . 'header.tpl');
         }
         if ($this->template) {
             $this->smartyOutputContent($this->template);
         } else {
             // For retrocompatibility with 1.4 controller
             $this->displayContent();
         }
         if ($this->display_footer) {
             $this->smartyOutputContent(_PS_THEME_DIR_ . 'footer.tpl');
         }
         // END - 1.4 retrocompatibility - will be removed in 1.6
     }
     return true;
 }
开发者ID:rongandat,项目名称:vatfairfoot,代码行数:53,代码来源:FrontController.php

示例4: display

 public function display()
 {
     Tools::safePostVars();
     // assign css_files and js_files at the very last time
     if ((Configuration::get('PS_CSS_THEME_CACHE') || Configuration::get('PS_JS_THEME_CACHE')) && is_writable(_PS_THEME_DIR_ . 'cache')) {
         // CSS compressor management
         if (Configuration::get('PS_CSS_THEME_CACHE')) {
             $this->css_files = Media::cccCSS($this->css_files);
         }
         //JS compressor management
         if (Configuration::get('PS_JS_THEME_CACHE')) {
             $this->js_files = Media::cccJs($this->js_files);
         }
     }
     $this->context->smarty->assign('css_files', $this->css_files);
     $this->context->smarty->assign('js_files', array_unique($this->js_files));
     $this->context->smarty->assign(array('errors' => $this->errors, 'display_header' => $this->display_header, 'display_footer' => $this->display_footer));
     // Don't use live edit if on mobile device
     if ($this->context->getMobileDevice() == false && Tools::isSubmit('live_edit')) {
         $this->context->smarty->assign('live_edit', $this->getLiveEditFooter());
     }
     $layout = $this->getLayout();
     if ($layout) {
         if ($this->template) {
             $this->context->smarty->assign('template', $this->context->smarty->fetch($this->template));
         } else {
             ob_start();
             $this->displayContent();
             $template = ob_get_contents();
             ob_clean();
             $this->context->smarty->assign('template', $template);
         }
         $this->smartyOutputContent($layout);
     } else {
         // BEGIN - 1.4 retrocompatibility - will be removed in 1.6
         Tools::displayAsDeprecated('layout.tpl is missing in your theme directory');
         if ($this->display_header) {
             $this->smartyOutputContent(_PS_THEME_DIR_ . 'header.tpl');
         }
         if ($this->template) {
             $this->smartyOutputContent($this->template);
         } else {
             // For retrocompatibility with 1.4 controller
             $this->displayContent();
         }
         if ($this->display_footer) {
             $this->smartyOutputContent(_PS_THEME_DIR_ . 'footer.tpl');
         }
         // live edit
         if (Tools::isSubmit('live_edit') && ($ad = Tools::getValue('ad')) && Tools::getAdminToken('AdminModulesPositions' . (int) Tab::getIdFromClassName('AdminModulesPositions') . (int) Tools::getValue('id_employee'))) {
             $this->context->smarty->assign(array('ad' => $ad, 'live_edit' => true));
             $this->smartyOutputContent(_PS_ALL_THEMES_DIR_ . 'live_edit.tpl');
         }
         // END - 1.4 retrocompatibility - will be removed in 1.6
     }
     return true;
 }
开发者ID:rrameshsat,项目名称:Prestashop,代码行数:57,代码来源:FrontController.php

示例5: display

 public function display()
 {
     Tools::safePostVars();
     // Automatically add js files from js/autoload directory in the template
     if (@filemtime($this->getThemeDir() . 'js/autoload/')) {
         foreach (scandir($this->getThemeDir() . 'js/autoload/', 0) as $file) {
             if (preg_match('/^[^.].*\\.js$/', $file)) {
                 $this->addJS($this->getThemeDir() . 'js/autoload/' . $file);
             }
         }
     }
     // Automatically add css files from css/autoload directory in the template
     if (@filemtime($this->getThemeDir() . 'css/autoload/')) {
         foreach (scandir($this->getThemeDir() . 'css/autoload', 0) as $file) {
             if (preg_match('/^[^.].*\\.css$/', $file)) {
                 $this->addCSS($this->getThemeDir() . 'css/autoload/' . $file);
             }
         }
     }
     // assign css_files and js_files at the very last time
     if ((Configuration::get('PS_CSS_THEME_CACHE') || Configuration::get('PS_JS_THEME_CACHE')) && is_writable(_PS_THEME_DIR_ . 'cache')) {
         // CSS compressor management
         if (Configuration::get('PS_CSS_THEME_CACHE')) {
             $this->css_files = Media::cccCSS($this->css_files);
         }
         //JS compressor management
         if (Configuration::get('PS_JS_THEME_CACHE') && !$this->useMobileTheme()) {
             $this->js_files = Media::cccJs($this->js_files);
         }
     }
     $this->context->smarty->assign(array('css_files' => $this->css_files, 'js_files' => array(), 'errors' => $this->errors, 'display_header' => $this->display_header, 'display_footer' => $this->display_footer));
     $live_edit_content = '';
     // Don't use live edit if on mobile theme
     if (!$this->useMobileTheme() && $this->checkLiveEditAccess()) {
         $live_edit_content = $this->getLiveEditFooter();
     }
     $layout = $this->getLayout();
     if ($layout) {
         if ($this->template) {
             $this->context->smarty->assign('template', $this->context->smarty->fetch($this->template) . $live_edit_content);
         } else {
             ob_start();
             $this->displayContent();
             $template = ob_get_contents();
             ob_clean();
             $this->context->smarty->assign('template', $template . $live_edit_content);
         }
         $this->smartyOutputContent($layout);
     } else {
         Tools::displayAsDeprecated('layout.tpl is missing in your theme directory');
         if ($this->display_header) {
             $this->smartyOutputContent(_PS_THEME_DIR_ . 'header.tpl');
         }
         if ($this->template) {
             $this->smartyOutputContent($this->template);
         } else {
             // For retrocompatibility with 1.4 controller
             $this->displayContent();
         }
         if ($this->display_footer) {
             $this->smartyOutputContent(_PS_THEME_DIR_ . 'footer.tpl');
         }
     }
     return true;
 }
开发者ID:dev-lav,项目名称:htdocs,代码行数:65,代码来源:FrontController.php


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