本文整理汇总了PHP中ilTree::getPathFull方法的典型用法代码示例。如果您正苦于以下问题:PHP ilTree::getPathFull方法的具体用法?PHP ilTree::getPathFull怎么用?PHP ilTree::getPathFull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilTree
的用法示例。
在下文中一共展示了ilTree::getPathFull方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addAdminLocatorItems
protected function addAdminLocatorItems()
{
$path = $this->tree->getPathFull($_GET["ref_id"], ilObjOrgUnit::getRootOrgRefId());
// add item for each node on path
foreach ((array) $path as $key => $row) {
if ($row["title"] == "__OrgUnitAdministration") {
$row["title"] = $this->lng->txt("objs_orgu");
}
$this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $row["child"]);
$this->ilLocator->addItem($row["title"], $this->ctrl->getLinkTargetByClass("ilobjorgunitgui", "view"), ilFrameTargetInfo::_getFrame("MainContent"), $row["child"]);
$this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $_GET["ref_id"]);
}
}
示例2: getContextPath
function getContextPath($a_endnode_id, $a_startnode_id = 1)
{
$path = "";
include_once "./Services/Tree/classes/class.ilTree.php";
$tree = new ilTree(1);
if (!$tree->isInTree($a_startnode_id) or !$tree->isInTree($a_endnode_id)) {
return '';
}
$tmpPath = $tree->getPathFull($a_endnode_id, $a_startnode_id);
// count -1, to exclude the learning module itself
for ($i = 1; $i < count($tmpPath) - 1; $i++) {
if ($path != "") {
$path .= " > ";
}
$path .= $tmpPath[$i]["title"];
}
return $path;
}
示例3: ilTree
/**
* get top chapter of page for that any precondition is missing
*/
function _getMissingPreconditionsTopChapter($cont_obj_ref_id, $cont_obj_id, $page_id)
{
$lm_tree = new ilTree($cont_obj_id);
$lm_tree->setTableNames('lm_tree', 'lm_data');
$lm_tree->setTreeTablePK("lm_id");
$conds = array();
if ($lm_tree->isInTree($page_id)) {
// get full path of page
$path = $lm_tree->getPathFull($page_id, $lm_tree->readRootId());
foreach ($path as $node) {
if ($node["type"] == "st") {
// get all preconditions of upper chapters
$tconds = ilConditionHandler::_getConditionsOfTarget($cont_obj_ref_id, $node["child"], "st");
foreach ($tconds as $tcond) {
// look for missing precondition
if (!ilConditionHandler::_checkCondition($tcond["id"])) {
return $node["child"];
}
}
}
}
}
return "";
}
示例4: setLocator
/**
* Set Locator Items
*/
function setLocator()
{
global $ilLocator, $tpl, $ilCtrl;
$ilLocator->addRepositoryItems($_GET["ref_id"]);
$this->getParentGUI()->addLocatorItems();
if ($_GET["obj_id"] > 0) {
$tree = new ilTree($this->slm_object->getId());
$tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
$tree->setTreeTablePK("slm_id");
$path = $tree->getPathFull($_GET["obj_id"]);
for ($i = 1; $i < count($path); $i++) {
//var_dump($path[$i]);
switch ($path[$i]["type"]) {
case "chap":
$ilCtrl->setParameterByClass("ilscorm2004chaptergui", "obj_id", $path[$i]["child"]);
$ilLocator->addItem($path[$i]["title"], $ilCtrl->getLinkTargetByClass("ilscorm2004chaptergui", "showOrganization"), "", 0, $path[$i]["type"], ilUtil::getImagePath("icon_chap_s.png"));
break;
case "seqc":
$ilCtrl->setParameterByClass("ilscorm2004seqchaptergui", "obj_id", $path[$i]["child"]);
$ilLocator->addItem($path[$i]["title"], $ilCtrl->getLinkTargetByClass("ilscorm2004seqchaptergui", "showOrganization"), "", 0, $path[$i]["type"], ilUtil::getImagePath("icon_chap_s.png"));
break;
case "sco":
$ilCtrl->setParameterByClass("ilscorm2004scogui", "obj_id", $path[$i]["child"]);
$ilLocator->addItem($path[$i]["title"], $ilCtrl->getLinkTargetByClass("ilscorm2004scogui", "showOrganization"), "", 0, $path[$i]["type"], ilUtil::getImagePath("icon_sco_s.png"));
break;
case "ass":
$ilCtrl->setParameterByClass("ilscorm2004assetgui", "obj_id", $path[$i]["child"]);
$ilLocator->addItem($path[$i]["title"], $ilCtrl->getLinkTargetByClass("ilscorm2004assetgui", "showOrganization"), "", 0, $path[$i]["type"], ilUtil::getImagePath("icon_sca_s.png"));
break;
case "page":
$ilCtrl->setParameterByClass("ilscorm2004pagegui", "obj_id", $path[$i]["child"]);
$ilLocator->addItem($path[$i]["title"], $ilCtrl->getLinkTargetByClass("ilscorm2004pagegui", "edit"), "", 0, $path[$i]["type"], ilUtil::getImagePath("icon_pg_s.png"));
break;
}
}
}
$ilCtrl->setParameter($this, "obj_id", $_GET["obj_id"]);
$tpl->setLocator();
}