本文整理匯總了PHP中Tags::getTree方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tags::getTree方法的具體用法?PHP Tags::getTree怎麽用?PHP Tags::getTree使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tags
的用法示例。
在下文中一共展示了Tags::getTree方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: explode
// Cannot use new style of parameters here (function is called by a custom-attribute event - and therefore does not know about named parameters)
// Split PageID and SiteID
$data = explode('-', $this->reponsedata['name']->yg_id);
// Set the new name
if ($tagMgr->setName($data[0], $this->reponsedata['name']->value) === false) {
$koala->alert($itext['TXT_ERROR_ACCESS_DENIED']);
} else {
$jsQueue->add($data[0], HISTORYTYPE_TAG, 'OBJECT_CHANGE', sGuiUS(), 'tag', NULL, NULL, $this->reponsedata['name']->yg_id, 'name', $this->reponsedata['name']->value);
$jsQueue->add($data[0], HISTORYTYPE_TAG, 'OBJECT_CHANGE', sGuiUS(), 'page', NULL, NULL, $this->reponsedata['name']->yg_id, 'name', $this->reponsedata['name']->value);
$jsQueue->add($data[0], HISTORYTYPE_TAG, 'REFRESH_WINDOW', sGuiUS(), 'name');
}
break;
case 'tagSelectNode':
$node = $this->params['node'];
$wid = $this->params['wid'];
$root_node = $tagMgr->getTree(NULL, 0);
// Tags
// 1 = rsub
// 2 = rread
// 3 = rdelete
// 4 = parent -> rsub & rwrite
// 5 = parent -> rsub & rwrite
// 6 = rdelete
$buttons = array();
// Get Parents
$parentid = $tagMgr->getParents($node);
$parentid = $parentid[0][0]['ID'];
// Check rights
$rread = $tagMgr->permissions->checkInternal(sUserMgr()->getCurrentUserID(), $node, "RREAD");
$rwrite = $tagMgr->permissions->checkInternal(sUserMgr()->getCurrentUserID(), $node, "RWRITE");
$rsub = $tagMgr->permissions->checkInternal(sUserMgr()->getCurrentUserID(), $node, "RSUB");
示例2: Icons
<?php
header('Content-type: text/xml');
$newsite = (int) $this->request->parameters['site'];
$newpage = (int) $this->request->parameters['page'];
$node_id = $this->request->parameters['nid'];
if ($node_id) {
$node_id = str_replace('tag_', '', $node_id);
}
$maxlevels = 1;
if ($newsite != 0) {
$site = $newsite;
}
$icons = new Icons();
$tagMgr = new Tags();
$tree = $tagMgr->getTree($node_id, 2);
$yo = $tagMgr->tree->nest($tree);
$xml_tree = array();
$tree_id = 0;
$tree_level = 0;
$action = $this->request->parameters['action'];
if ($action == 'addtag') {
$noclick = 'noclick';
} else {
$noclick = '';
}
if ($node_id) {
$root_id = 'tag_' . $yo[$node_id]['ID'];
$root_name = htmlspecialchars($yo[$node_id]['NAME']);
$root_cststyle = '';
} else {