本文整理汇总了PHP中hierarchy::get_manager方法的典型用法代码示例。如果您正苦于以下问题:PHP hierarchy::get_manager方法的具体用法?PHP hierarchy::get_manager怎么用?PHP hierarchy::get_manager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hierarchy
的用法示例。
在下文中一共展示了hierarchy::get_manager方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check_loginuser_registrar_admin
/**
* @method check_loginuser_registrar_admin
* @todo to display school list based logged in user (registrar, admin) *
* @param boolean $schoolids_in_formofstring (used to get schoolids in the form of string)
* @return based on condition it returns array of objects or string type of data
*/
public function check_loginuser_registrar_admin($schoolids_in_formofstring = false) {
global $DB, $USER, $CFG;
$hier1 = new hierarchy();
// checking of login user is admin..
if (is_siteadmin($USER->id)) {
$schoolid = $DB->get_records('local_school', array('visible' => 1));
} else {
//------------if registrar not assigned to any school it throws exception
$users = $hier1->get_manager();
$schoolid = $hier1->get_assignedschools();
} // end of else
if (empty($schoolid)) {
throw new schoolnotfound_exception();
}
if ($schoolids_in_formofstring) {
foreach ($schoolid as $sid) {
$temp[] = $sid->id;
}
$school_id = implode(',', $temp);
return $school_id;
} else
return $schoolid;
}
示例2: array
$table->head = array(
get_string('schoolname', 'local_collegestructure'), get_string('username', 'local_collegestructure'));
}
$table->size = array('40%', '40%', '20%');
$table->align = array('left', 'left', 'left', 'center');
$table->width = '99%';
$table->data = $data;
echo html_writer::table($table);
echo '<br/><br/>';
echo $OUTPUT->box(get_string('assignregistrartxt', 'local_collegestructure'));
$hierarchy = new hierarchy();
$users = $hierarchy->get_manager();
$PAGE->requires->js('/local/collegestructure/js/school.js');
if (!$users) {
echo $OUTPUT->heading(get_string("nousersyet", 'local_collegestructure'));
} else {
echo '<form id="movemodules" action="assignusers.php" method="post"><div>';
echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
echo '<table border="0" cellspacing="2" width="50%" cellpadding="4" class="generalbox boxaligncenter"><tr>';
echo '<th class="header" align="left">' . get_string('username', 'local_collegestructure') . '</th>';
echo '<th class="header" scope="col" align="center">' . get_string('select') . '</th>';
echo '</tr>';
$count = 0;
$abletomoveusers = false;
/* ---for now--- */