本文整理匯總了PHP中ilLMObject::preloadDataByLM方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilLMObject::preloadDataByLM方法的具體用法?PHP ilLMObject::preloadDataByLM怎麽用?PHP ilLMObject::preloadDataByLM使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ilLMObject
的用法示例。
在下文中一共展示了ilLMObject::preloadDataByLM方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor
*
* @param object $a_parent_obj parent gui object
* @param string $a_parent_cmd parent cmd
* @param ilObjContentObject $a_lm learning module
*/
public function __construct($a_parent_obj, $a_parent_cmd, ilObjContentObject $a_lm, $a_id = "")
{
$this->lm = $a_lm;
include_once "./Modules/LearningModule/classes/class.ilLMTree.php";
$tree = ilLMTree::getInstance($this->lm->getId());
//echo "+".$tree->isCacheUsed()."+";
// $tree = new ilTree($this->lm->getId());
// $tree->setTableNames('lm_tree','lm_data');
// $tree->setTreeTablePK("lm_id");
include_once "./Modules/LearningModule/classes/class.ilLMObject.php";
$this->cnt_lmobj = ilLMObject::preloadDataByLM($this->lm->getId());
include_once "./Services/COPage/classes/class.ilPageObject.php";
ilPageObject::preloadActivationDataByParentId($this->lm->getId());
if ($a_id == "") {
$a_id = "lm_exp";
// this does not work, since it is not set yet
if ($this->getOfflineMode()) {
$a_id = "lm_exp_off";
}
}
parent::__construct($a_id, $a_parent_obj, $a_parent_cmd, $tree);
$this->setSkipRootNode(false);
$this->setAjax(false);
$this->setPreloadChilds(true);
if ((int) $_GET["obj_id"] > 0) {
$this->setPathOpen((int) $_GET["obj_id"]);
}
}