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


PHP JS::getConfigurableLibraries方法代码示例

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


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

示例1: getTemplates

 /**
  * Returns an array of all basic templates for the active theme
  * @return  array           The array of template strings
  * @access  public
  */
 function getTemplates($page)
 {
     global $objDatabase;
     if (isset($_GET['custom_content']) && preg_match('/^[a-zA-Z0-9_]+$/', $_GET['custom_content'])) {
         $this->customContentTemplate = $_GET['custom_content'];
     }
     if (isset($_GET['preview']) && intval($_GET['preview'])) {
         $id = intval($_GET['preview']);
         $theme = $this->themeRepository->findById($id);
         if ($theme) {
             $this->currentThemesId = $id;
         }
     }
     // get theme object so we get the configured libraries
     $theme = $this->getFrontendTemplate();
     $themesPath = $theme->getFoldername();
     if ($theme && $theme->isComponent()) {
         $libraries = JS::getConfigurableLibraries();
         foreach ($theme->getDependencies() as $libraryName => $libraryVersions) {
             if (!isset($libraries[$libraryName])) {
                 continue;
             }
             $version = $libraryVersions[0];
             $libraryData = isset($libraries[$libraryName]['versions'][$version]) ? $libraries[$libraryName]['versions'][$version] : array();
             if (isset($libraryData['jsfiles'])) {
                 foreach ($libraryData['jsfiles'] as $file) {
                     \JS::registerJS($file, true);
                 }
             }
             if (isset($libraryData['cssfiles'])) {
                 foreach ($libraryData['cssfiles'] as $file) {
                     \JS::registerCSS($file);
                 }
             }
         }
     }
     $this->themesPath = $themesPath;
     $this->templates['index'] = $this->getThemeFileContent($themesPath, 'index.html');
     $this->templates['home'] = $this->getThemeFileContent($themesPath, 'home.html');
     $this->templates['navbar'] = $this->getThemeFileContent($themesPath, 'navbar.html');
     $this->templates['navbar2'] = $this->getThemeFileContent($themesPath, 'navbar2.html');
     $this->templates['navbar3'] = $this->getThemeFileContent($themesPath, 'navbar3.html');
     $this->templates['subnavbar'] = $this->getThemeFileContent($themesPath, 'subnavbar.html');
     $this->templates['subnavbar2'] = $this->getThemeFileContent($themesPath, 'subnavbar2.html');
     $this->templates['subnavbar3'] = $this->getThemeFileContent($themesPath, 'subnavbar3.html');
     $this->templates['sidebar'] = $this->getThemeFileContent($themesPath, 'sidebar.html');
     $this->templates['top_news'] = $this->getThemeFileContent($themesPath, 'top_news.html');
     $this->templates['shopnavbar'] = $this->getThemeFileContent($themesPath, 'shopnavbar.html');
     $this->templates['shopnavbar2'] = $this->getThemeFileContent($themesPath, 'shopnavbar2.html');
     $this->templates['shopnavbar3'] = $this->getThemeFileContent($themesPath, 'shopnavbar3.html');
     $this->templates['headlines'] = $this->getThemeFileContent($themesPath, 'headlines.html');
     $this->templates['headlines2'] = $this->getThemeFileContent($themesPath, 'headlines2.html');
     $this->templates['headlines3'] = $this->getThemeFileContent($themesPath, 'headlines3.html');
     $this->templates['headlines4'] = $this->getThemeFileContent($themesPath, 'headlines4.html');
     $this->templates['news_recent_comments'] = $this->getThemeFileContent($themesPath, 'news_recent_comments.html');
     $this->templates['javascript'] = $this->getThemeFileContent($themesPath, 'javascript.js');
     //$this->templates['style']                 = $this->getThemeFileContent($themesPath, 'style.css');
     $this->templates['buildin_style'] = $this->getThemeFileContent($themesPath, 'buildin_style.css');
     $this->templates['calendar_headlines'] = $this->getThemeFileContent($themesPath, 'events.html');
     $this->templates['directory_content'] = $this->getThemeFileContent($themesPath, 'directory.html');
     $this->templates['forum_content'] = $this->getThemeFileContent($themesPath, 'forum.html');
     $this->templates['podcast_content'] = $this->getThemeFileContent($themesPath, 'podcast.html');
     $this->templates['blog_content'] = $this->getThemeFileContent($themesPath, 'blog.html');
     $this->templates['immo'] = $this->getThemeFileContent($themesPath, 'immo.html');
     if (!$this->hasCustomContent() || !$this->loadCustomContent($page)) {
         // load default content layout if page doesn't have a custom content
         // layout or if it failed to be loaded
         $this->templates['content'] = $this->getThemeFileContent($themesPath, 'content.html');
     }
     return $this->templates;
 }
开发者ID:hbdsklf,项目名称:LimeCMS,代码行数:76,代码来源:Init.class.php

示例2: setDependencies

 public function setDependencies($dependencies = array())
 {
     $this->configurableLibraries = \JS::getConfigurableLibraries();
     usort($dependencies, array($this, 'sortDependencies'));
     $this->componentData['dependencies'] = $dependencies;
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:6,代码来源:Theme.class.php

示例3: getLibrarySettings

 /**
  * Get the library settings column on overview page
  * @param \Cx\Core\View\Model\Entity\Theme $theme the template object
  */
 protected function getLibrarySettings($theme)
 {
     global $_ARRAYLANG, $objTemplate;
     $libraries = \JS::getConfigurableLibraries();
     $objTemplate->setVariable(array('TXT_TEMPLATE_USED_LIBRARIES' => $_ARRAYLANG['TXT_TEMPLATE_USED_LIBRARIES'], 'TXT_SAVE' => $_ARRAYLANG['TXT_SAVE'], 'THEMES_SELECTED_THEME' => $theme->getFoldername()));
     $objTemplate->setGlobalVariable('TXT_THEME_LIBRARY_NOT_USED', $_ARRAYLANG['TXT_THEME_LIBRARY_NOT_USED']);
     $usedLibraries = $theme->getDependencies();
     // parse available libraries as setting tab
     $objTemplate->setCurrentBlock('theme_library');
     foreach ($libraries as $libraryName => $libraryInfo) {
         foreach ($libraryInfo['versions'] as $version => $files) {
             $objTemplate->setVariable(array('THEME_LIBRARY_NAME' => $libraryName, 'THEME_LIBRARY_VERSION' => $version, 'THEME_LIBRARY_VERSION_SELECTED' => isset($usedLibraries[$libraryName]) && $version == $usedLibraries[$libraryName][0] ? 'selected="selected"' : ''));
             $objTemplate->parse('theme_library_version');
         }
         if (array_key_exists($libraryName, $usedLibraries)) {
             $objTemplate->setVariable('THEME_LIBRARY_ACTIVE_CHECKED', 'checked="checked"');
         } else {
             $objTemplate->setVariable('THEME_LIBRARY_VERSION_DROPDOWN_HIDDEN', 'style="display: none;"');
         }
         $objTemplate->setVariable('THEME_LIBRARY_NAME', $libraryName);
         $objTemplate->parseCurrentBlock();
     }
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:27,代码来源:ViewManager.class.php


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