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


PHP Shineisp_Commons_Utilities::columnSort方法代码示例

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


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

示例1: showblock

 /**
  * showblock
  * Handle the XML Blocks 
  * @param unknown_type $side
  */
 public function showblock($side)
 {
     $ns = new Zend_Session_Namespace('Admin');
     $languageID = Languages::get_language_id($ns->lang);
     $record = array();
     $blocks = array();
     // Get the main variables
     $module = Zend_Controller_Front::getInstance()->getRequest()->getModuleName();
     $controller = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
     $action = Zend_Controller_Front::getInstance()->getRequest()->getActionName();
     $customskin = Settings::findbyParam('adminskin');
     $skin = !empty($customskin) ? $customskin : "base";
     // call the placeholder view helper for each side parsed
     echo $this->view->placeholder($side);
     // Get all the xml blocks
     $xmlblocks = Shineisp_Commons_Layout::getBlocks($module, $side, $controller, $skin);
     if (!empty($xmlblocks)) {
         $blocks['reference'] = $xmlblocks;
     }
     if (!empty($blocks['reference'])) {
         $blocks['reference'] = Shineisp_Commons_Utilities::columnSort($blocks['reference'], 'position');
     }
     if (isset($blocks['reference']['block'])) {
         $this->Iterator($blocks['reference'], $side);
     } elseif (isset($blocks['reference'][0])) {
         foreach ($blocks['reference'] as $block) {
             $this->Iterator($block, $side);
         }
     }
     $this->view->module = $module;
     $this->view->controller = $controller;
     $this->view->action = $action;
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:38,代码来源:Blocks.php

示例2: showblock

 /**
  * showblock
  * Handle the Cms blocks and XML Blocks 
  * @param unknown_type $side
  */
 public function showblock($side)
 {
     $ns = new Zend_Session_Namespace();
     $languageID = $ns->langid;
     $record = array();
     $blocks = array();
     // Get the main variables
     $module = Zend_Controller_Front::getInstance()->getRequest()->getModuleName();
     $controller = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
     $action = Zend_Controller_Front::getInstance()->getRequest()->getActionName();
     $customskin = Settings::findbyParam('skin');
     $skin = !empty($customskin) ? $customskin : "blank";
     // call the placeholder view helper for each side parsed
     echo $this->view->placeholder($side);
     // Get all the xml blocks
     $xmlblocks = Shineisp_Commons_Layout::getBlocks($module, $side, $controller, $skin);
     // HOMEPAGE BLOCKS
     // If the controller called is the homepage, event detail page or a cms page ...
     // #################
     if ($controller == "index") {
         $record = CmsPages::findbyvar('homepage', $ns->lang);
         $var = Zend_Controller_Front::getInstance()->getRequest()->getParam('url');
         if (!empty($var)) {
             $record = CmsPages::findbyvar($var, $ns->lang);
         }
     } elseif ($controller == "cms") {
         $var = Zend_Controller_Front::getInstance()->getRequest()->getParam('url');
         $record = CmsPages::findbyvar($var, $ns->lang);
     }
     // Load the xml found in the recordset
     if (!empty($record['blocks'])) {
         // Load the xml into an array
         $xmlobject = simplexml_load_string($record['blocks']);
         // Get the blocks from the xml structure
         if (count($xmlobject)) {
             $i = 0;
             foreach ($xmlobject as $block) {
                 $blocks['reference'][$i]['block']['name'] = (string) $block;
                 $blocks['reference'][$i]['side'] = (string) $block['side'];
                 $blocks['reference'][$i]['position'] = (string) $block['position'];
                 $i++;
             }
         }
     }
     // Join every block in one unique blocks structure
     if (!empty($xmlblocks)) {
         if (!empty($blocks['reference'])) {
             $blocks['reference'] = array_merge($xmlblocks, $blocks['reference']);
         } else {
             $blocks['reference'] = $xmlblocks;
         }
     }
     if (!empty($blocks['reference'])) {
         $blocks['reference'] = Shineisp_Commons_Utilities::columnSort($blocks['reference'], 'position');
     }
     if (isset($blocks['reference']['block'])) {
         $this->Iterator($blocks['reference'], $side);
     } elseif (isset($blocks['reference'][0])) {
         foreach ($blocks['reference'] as $block) {
             $this->Iterator($block, $side);
         }
     }
     if (Settings::findbyParam('debug')) {
         echo "<div class=\"alert alert-info\"><h4>{$side} <small>({$skin})</small></h4>Path: {$module}/{$controller}/{$action}</div>";
     }
     $this->view->module = $module;
     $this->view->controller = $controller;
     $this->view->action = $action;
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:74,代码来源:Blocks.php


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