本文整理匯總了PHP中ilObject::setPoolUsage方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilObject::setPoolUsage方法的具體用法?PHP ilObject::setPoolUsage怎麽用?PHP ilObject::setPoolUsage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ilObject
的用法示例。
在下文中一共展示了ilObject::setPoolUsage方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: afterSave
/**
* save object
* @access public
*/
function afterSave(ilObject $a_new_object)
{
// added by JP and moved here by BH
// BH: why is the property not initialised with true within the object class per default .. ?
$a_new_object->setPoolUsage(true);
$tstdef = $this->getDidacticTemplateVar("tstdef");
if ($tstdef) {
$testDefaultsId = $tstdef;
$testDefaults = ilObjTest::_getTestDefaults($testDefaultsId);
$a_new_object->applyDefaults($testDefaults);
}
$template_id = $this->getDidacticTemplateVar("tsttpl");
if ($template_id) {
include_once "Services/Administration/classes/class.ilSettingsTemplate.php";
$template = new ilSettingsTemplate($template_id, ilObjAssessmentFolderGUI::getSettingsTemplateConfig());
$template_settings = $template->getSettings();
if ($template_settings) {
$this->applyTemplate($template_settings, $a_new_object);
}
$a_new_object->setTemplate($template_id);
}
$a_new_object->saveToDb();
// always send a message
ilUtil::sendSuccess($this->lng->txt("object_added"), true);
ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&ref_id=" . $a_new_object->getRefId() . "&cmd=properties");
}