本文整理汇总了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");
}