本文整理匯總了PHP中ilCtrl::setCmd方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilCtrl::setCmd方法的具體用法?PHP ilCtrl::setCmd怎麽用?PHP ilCtrl::setCmd使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ilCtrl
的用法示例。
在下文中一共展示了ilCtrl::setCmd方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: showMoveIntoObjectTreeObject
public function showMoveIntoObjectTreeObject()
{
require_once "./Services/Tree/classes/class.ilTree.php";
require_once "./Modules/OrgUnit/classes/class.ilOrgUnitExplorerGUI.php";
$this->ctrl->setCmd('performPaste');
$ilOrgUnitExplorerGUI = new ilOrgUnitExplorerGUI("orgu_explorer", "ilObjOrgUnitGUI", "showTree", new ilTree(1));
$ilOrgUnitExplorerGUI->setTypeWhiteList(array("orgu"));
if (!$ilOrgUnitExplorerGUI->handleCommand()) {
$this->tpl->setContent($ilOrgUnitExplorerGUI->getHTML());
}
}
示例2: populateSolutionOutput
private function populateSolutionOutput(ilTemplate $tpl)
{
// FOR WHAT EXACTLY IS THIS USEFUL?
$this->ctrl->setReturnByClass('ilAssQuestionPageGUI', 'view');
$this->ctrl->setReturnByClass('ilObjQuestionPoolGUI', 'questions');
include_once "./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php";
$pageGUI = new ilAssQuestionPageGUI($this->questionOBJ->getId());
$pageGUI->setEditPreview(true);
$pageGUI->setEnabledTabs(false);
// FOR WHICH SITUATION IS THIS WORKAROUND NECCESSARY? (sure .. imagemaps, but where this can be done?)
if (strlen($this->ctrl->getCmd()) == 0 && !isset($_POST['editImagemapForward_x'])) {
$this->ctrl->setCmdClass(get_class($pageGUI));
$this->ctrl->setCmd('preview');
}
$this->questionGUI->setPreviewSession($this->previewSession);
$pageGUI->setQuestionHTML(array($this->questionOBJ->getId() => $this->questionGUI->getSolutionOutput(0)));
//$pageGUI->setHeader($this->questionOBJ->getTitle()); // NO ADDITIONAL HEADER
//$pageGUI->setPresentationTitle($this->questionOBJ->getTitle());
//$pageGUI->setTemplateTargetVar("ADM_CONTENT"); // NOT REQUIRED, OR IS?
$tpl->setCurrentBlock('solution_output');
$tpl->setVariable('SOLUTION_OUTPUT', $pageGUI->preview());
$tpl->parseCurrentBlock();
}