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


PHP common_node::getFullPath方法代码示例

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


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

示例1: mainAction

 /**
  * main action
  */
 public function mainAction()
 {
     if (is_numeric($this->GET['id'])) {
         $node_id = $this->GET['id'];
     } else {
         msg('node_edit: node_id is not numeric', 'error');
         return false;
     }
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $node_data = $Node->detail($node_id);
     $this->tpl->assign("NODE", $node_data);
     $_SESSION['active_pages'] = $Node->getActiveNodes($node_id, array('page', 'container'));
     $_SESSION['full_path'] = $Node->getFullPath($node_id);
     if ($_POST['node']['node_controller'] != '') {
         $node_controller = $_POST['node']['node_controller'];
     } else {
         $node_controller = $node_data['node_controller'];
     }
     $controller = "bo/node/{$node_data['node_group']}/{$node_controller}";
     if (getTemplateDir($controller . ".html") == '') {
         $controller_html = "bo/node/{$node_data['node_group']}/default";
     } else {
         $controller_html = $controller;
     }
     if (file_exists(ONXSHOP_DIR . "controllers/{$controller}.php") || file_exists(ONXSHOP_PROJECT_DIR . "controllers/{$controller}.php")) {
         $controller_php = $controller;
     } else {
         $controller_php = "bo/node/{$node_data['node_group']}/default";
     }
     $_Onxshop_Request = new Onxshop_Request("{$controller_php}@{$controller_html}&id={$node_id}&orig={$this->GET['orig']}&popup={$this->GET['popup']}", $this);
     $this->setContent($_Onxshop_Request->getContent());
     $this->tpl->assign("SUB_CONTENT", $this->content);
     if ($this->GET['ajax'] == 0) {
         $this->tpl->parse('content.form');
     }
     return true;
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:41,代码来源:node_edit.php

示例2: setActivePages

 /**
  * set active pages
  */
 public function setActivePages()
 {
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $_SESSION['active_pages'] = $Node->getActivePages($this->GET['id']);
     $_SESSION['full_path'] = $Node->getFullPath($this->GET['id']);
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:10,代码来源:default.php

示例3: getConfiguration

 /**
  * get configuration
  * 
  * @param integer $node_id
  * ID of node
  * 0 for default configuration
  * 
  * @return array
  * configuration
  * 
  * @see getDefaultCoreValues
  */
 function getConfiguration($node_id = 0)
 {
     if (!is_numeric($node_id)) {
         msg("common_configuration.getConfiguration: node_id is not numeric", 'error');
         $node_id = 0;
     }
     /**
      * Cache configuration wihtin a single HTTP request
      */
     if (!self::$localCache) {
         self::$localCache = array();
         $list = $this->listing();
         foreach ($list as $item) {
             self::$localCache[$item['node_id']][] = $item;
         }
     }
     $conf = array();
     if (is_array(self::$localCache[$node_id])) {
         foreach (self::$localCache[$node_id] as $c) {
             $conf[$c['object']][$c['property']] = $c['value'];
         }
     }
     /**
      * default core values (only for root node)
      */
     if ($node_id == 0) {
         $conf = $this->getDefaultCoreValues($conf);
     } else {
         /**
          * Try to inherit configuration from parent nodes
          */
         require_once 'models/common/common_node.php';
         $Node = new common_node();
         $path = $Node->getFullPath($node_id);
         for ($i = 1; $i < count($path); $i++) {
             $parent_id = $path[$i];
             if (is_array(self::$localCache[$parent_id])) {
                 foreach (self::$localCache[$parent_id] as $c) {
                     if (!isset($conf[$c['object']][$c['property']]) && $c['apply_to_children']) {
                         $conf[$c['object']][$c['property']] = $c['value'];
                     }
                 }
             }
         }
     }
     return $conf;
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:59,代码来源:common_configuration.php


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