本文整理汇总了PHP中Skill::get_children方法的典型用法代码示例。如果您正苦于以下问题:PHP Skill::get_children方法的具体用法?PHP Skill::get_children怎么用?PHP Skill::get_children使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Skill
的用法示例。
在下文中一共展示了Skill::get_children方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
Display::addFlash(Display::return_message(sprintf(get_lang('SkillXEnabled'), $skill->getName()), 'success'));
}
header('Location: ' . api_get_self());
exit;
break;
case 'disable':
$skill = $entityManager->find('ChamiloCoreBundle:Skill', $skillId);
if (is_null($skill)) {
Display::addFlash(Display::return_message(get_lang('SkillNotFound'), 'error'));
} else {
$updatedAt = new DateTime(api_get_utc_datetime(), new DateTimeZone(_api_get_timezone()));
$skill->setStatus(0);
$skill->setUpdatedAt($updatedAt);
$entityManager->persist($skill);
$skillObj = new Skill();
$childrens = $skillObj->get_children($skill->getId());
foreach ($childrens as $children) {
$skill = $entityManager->find('ChamiloCoreBundle:Skill', $children['id']);
if (empty($skill)) {
continue;
}
$skill->setStatus(0);
$skill->setUpdatedAt($updatedAt);
$entityManager->persist($skill);
}
$entityManager->flush();
Display::addFlash(Display::return_message(sprintf(get_lang('SkillXDisabled'), $skill->getName()), 'success'));
}
header('Location: ' . api_get_self());
exit;
break;
示例2: isset
break;
case 'get_user_skills':
$skills = $skill->get_user_skills($user_id, true);
Display::display_no_header();
Display::$global_template->assign('skills', $skills);
echo Display::$global_template->fetch('default/skill/user_skills.tpl');
break;
case 'get_gradebook_info':
$id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;
$info = $gradebook->get($id);
echo json_encode($info);
break;
case 'load_children':
$id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;
$load_user_data = isset($_REQUEST['load_user_data']) ? $_REQUEST['load_user_data'] : null;
$skills = $skill->get_children($id, $load_user_data);
$return = array();
foreach ($skills as $skill) {
if (isset($skill['data']) && !empty($skill['data'])) {
$return[$skill['data']['id']] = array('id' => $skill['data']['id'], 'name' => $skill['data']['name'], 'passed' => $skill['data']['passed']);
}
}
$success = true;
if (empty($return)) {
$success = false;
}
$result = array('success' => $success, 'data' => $return);
echo json_encode($result);
break;
case 'load_direct_parents':
$id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;