本文整理匯總了PHP中ilObject::applySettingsTemplate方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilObject::applySettingsTemplate方法的具體用法?PHP ilObject::applySettingsTemplate怎麽用?PHP ilObject::applySettingsTemplate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ilObject
的用法示例。
在下文中一共展示了ilObject::applySettingsTemplate方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: afterSave
/**
* save object
* @access public
*/
function afterSave(ilObject $a_new_object)
{
$tpl = $this->getDidacticTemplateVar("svytpl");
if ($tpl) {
$a_new_object->applySettingsTemplate($tpl);
}
$a_new_object->set360Mode((bool) $this->getDidacticTemplateVar("svy360"));
if ($a_new_object->get360Mode()) {
// this should rather be ilObjSurvey::ANONYMIZE_ON - see ilObjSurvey::getUserDataFromActiveId()
$a_new_object->setAnonymize(ilObjSurvey::ANONYMIZE_CODE_ALL);
$a_new_object->setEvaluationAccess(ilObjSurvey::EVALUATION_ACCESS_PARTICIPANTS);
}
$a_new_object->saveToDB();
// always send a message
ilUtil::sendSuccess($this->lng->txt("object_added"), true);
ilUtil::redirect("ilias.php?baseClass=ilObjSurveyGUI&ref_id=" . $a_new_object->getRefId() . "&cmd=properties");
}
示例2: afterSave
/**
* save object
* @access public
*/
function afterSave(ilObject $a_new_object)
{
$tpl = $this->getDidacticTemplateVar("svytpl");
if ($tpl) {
$a_new_object->applySettingsTemplate($tpl);
}
// always send a message
ilUtil::sendSuccess($this->lng->txt("object_added"), true);
ilUtil::redirect("ilias.php?baseClass=ilObjSurveyGUI&ref_id=" . $a_new_object->getRefId() . "&cmd=properties");
}