本文整理汇总了PHP中hierarchy::entity_settings方法的典型用法代码示例。如果您正苦于以下问题:PHP hierarchy::entity_settings方法的具体用法?PHP hierarchy::entity_settings怎么用?PHP hierarchy::entity_settings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hierarchy
的用法示例。
在下文中一共展示了hierarchy::entity_settings方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: hierarchy
/**
* @method cobalt_update_program
* @todo Update the details of the existing Programs
* @param $data(array)
* */
function cobalt_update_program($data) {
global $DB;
$DB->update_record('local_program', $data);
$hierarchy = new hierarchy();
$DB->delete_records('local_level_settings', array('levelid' => $data->id));
$hierarchy->entity_settings($data);
}
示例2: object
/**
* @method curriculum_update_instance
* @todo to update exist curriculum
* @param object $data
* @return print confirmation message
* */
function curriculum_update_instance($data) {
global $DB, $CFG;
$curriculums = $DB->update_record('local_curriculum', $data);
$currenturl = "{$CFG->wwwroot}/local/curriculum/index.php";
$conf = new object();
$DB->delete_records('local_level_settings', array('levelid' => $data->id));
$hierarchy = new hierarchy();
$entersettings = $hierarchy->entity_settings($data);
$conf->curriculum = $data->fullname;
if ($curriculums || $entersettings) {
$message = get_string('updatecurricsuccess', 'local_curriculum', $conf);
$hierarchy->set_confirmation($message, $currenturl, array('style' => 'notifysuccess'));
}
}