本文整理汇总了PHP中common_node::getActiveNodes方法的典型用法代码示例。如果您正苦于以下问题:PHP common_node::getActiveNodes方法的具体用法?PHP common_node::getActiveNodes怎么用?PHP common_node::getActiveNodes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common_node
的用法示例。
在下文中一共展示了common_node::getActiveNodes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: getFullPath
public function getFullPath()
{
if (is_numeric($this->GET['store_node_id'])) {
$Node = new common_node();
return $Node->getActiveNodes($this->GET['store_node_id']);
}
return $_SESSION['full_path'];
}