本文整理匯總了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'));
}
}