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


PHP Pages::isGlobalElementsPageAvailable方法代码示例

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


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

示例1: defaultAction

 public function defaultAction()
 {
     if (Translate::getId() != '') {
         $config = Config::getArray();
         $languages = $config['backendLanguages']['list'];
         $language_id = Translate::getId();
         $strings = array();
         if (is_array($languages[$language_id]['translationClientside'])) {
             if (count($languages[$language_id]['translationClientside']) > 0) {
                 foreach ($languages[$language_id]['translationClientside'] as $translation_file) {
                     $temp = (include $translation_file);
                     $strings = array_merge($strings, $temp);
                 }
             }
         } else {
             if ($languages[$language_id]['translationClientside'] != '') {
                 $strings = (include $languages[$language_id]['translationClientside']);
             }
         }
         $this->view->assign('backendTranslation', $strings);
     } else {
         $this->view->assign('backendTranslation', array());
     }
     $useGlobalElementsPage = false;
     $pages = new Pages();
     if ($pages->isGlobalElementsPageTemplateAvailable()) {
         if ($pages->isGlobalElementsPageAvailable()) {
             $useGlobalElementsPage = true;
         }
     }
     $this->view->assign('useGlobalElementsPage', $useGlobalElementsPage);
     $this->view->assign('globalElementsPageId', $pages->getGlobalElementsPageId());
 }
开发者ID:pixelproduction,项目名称:PixelManagerCMS,代码行数:33,代码来源:Main.php

示例2: assignGlobalElementsToSmarty

 public function assignGlobalElementsToSmarty($smarty, $language_id)
 {
     $pages = new Pages();
     if ($pages->isGlobalElementsPageTemplateAvailable()) {
         if ($pages->isGlobalElementsPageAvailable()) {
             $global_elements_page_id = $pages->getGlobalElementsPageId();
             $global_elements_page_properties = $pages->getProperties($global_elements_page_id);
             if ($global_elements_page_properties !== false) {
                 $global_elements = array();
                 foreach ($this->global_elements_page_structure as $block_id => $block) {
                     if ($block['type'] == 'datablock') {
                         $block_data = null;
                         if (isset($this->global_elements_page_content[$block_id])) {
                             $block_data = $this->global_elements_page_content[$block_id];
                         }
                         $field_data = $this->getFieldsData($block['fields'], $block_data, $language_id);
                         $global_elements[$block_id] = $field_data;
                     } elseif ($block['type'] == 'container') {
                         $container_content = '';
                         if (isset($this->global_elements_page_content[$block_id])) {
                             if (is_array($this->global_elements_page_content[$block_id])) {
                                 foreach ($this->global_elements_page_content[$block_id] as $container_element_key => $container_element) {
                                     $container_content = $container_content . $this->getElement($global_elements_page_id, $language_id, $container_element['elementId'], $container_element['content'], false);
                                 }
                             }
                         }
                         $global_elements[$block_id] = $container_content;
                     }
                 }
                 $smarty->assign('globalElements', $global_elements);
             }
         }
     }
 }
开发者ID:pixelproduction,项目名称:PixelManagerCMS,代码行数:34,代码来源:StandardPageBuilder.php


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