function selector() { include_once "./Services/AccessControl/classes/class.ilConditionSelector.php"; ilUtil::sendInfo($this->lng->txt("condition_select_object")); $exp = new ilConditionSelector($this, "selector"); $exp->setTypeWhiteList(array_merge($this->getConditionHandler()->getTriggerTypes(), array("root", "cat", "grp", "fold", "crs"))); //setRefId have to be after setTypeWhiteList! $exp->setRefId($this->getTargetRefId()); $exp->setClickableTypes($this->getConditionHandler()->getTriggerTypes()); if (!$exp->handleCommand()) { $this->tpl->setContent($exp->getHTML()); } }
function selector() { global $tree; include_once "./Services/AccessControl/classes/class.ilConditionSelector.php"; $this->tpl->addBlockFile('ADM_CONTENT', "adm_content", "tpl.condition_selector.html", "Services/AccessControl"); ilUtil::sendInfo($this->lng->txt("condition_select_object")); $exp = new ilConditionSelector($this->ctrl->getLinkTarget($this, 'copySelector')); $exp->setExpand($_GET["condition_selector_expand"] ? $_GET["condition_selector_expand"] : $this->tree->readRootId()); $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'selector')); $exp->setTargetGet("ref_id"); $exp->setRefId($this->getTargetRefId()); if ($this->getTargetRefId()) { $path = $tree->getPathId($this->getTargetRefId()); array_pop($path); $exp->setForceOpenPath($path); } $exp->addFilter('crs'); $exp->addFilter('tst'); $exp->addFilter('sahs'); $exp->addFilter('svy'); $exp->setSelectableTypes($this->ch_obj->getTriggerTypes()); $exp->setControlClass($this); // build html-output $exp->setOutput(0); $this->tpl->setCurrentBlock("adm_content"); $this->tpl->setVariable("EXPLORER", $exp->getOutput()); $this->tpl->parseCurrentBlock(); }