本文整理匯總了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'];
}