本文整理汇总了PHP中table_sql::is_downloading方法的典型用法代码示例。如果您正苦于以下问题:PHP table_sql::is_downloading方法的具体用法?PHP table_sql::is_downloading怎么用?PHP table_sql::is_downloading使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类table_sql
的用法示例。
在下文中一共展示了table_sql::is_downloading方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add_user_columns
/**
* Add all the user-related columns to the $columns and $headers arrays.
* @param table_sql $table the table being constructed.
* @param array $columns the list of columns. Added to.
* @param array $headers the columns headings. Added to.
*/
protected function add_user_columns($table, &$columns, &$headers)
{
global $CFG;
if (!$table->is_downloading() && $CFG->grade_report_showuserimage) {
$columns[] = 'picture';
$headers[] = '';
}
if (!$table->is_downloading()) {
$columns[] = 'fullname';
$headers[] = get_string('name');
} else {
$columns[] = 'lastname';
$headers[] = get_string('lastname');
$columns[] = 'firstname';
$headers[] = get_string('firstname');
}
// When downloading, some extra fields are always displayed (because
// there's no space constraint) so do not include in extra-field list.
$extrafields = get_extra_user_fields($this->context, $table->is_downloading() ? array('institution', 'department', 'email') : array());
foreach ($extrafields as $field) {
$columns[] = $field;
$headers[] = get_user_field_name($field);
}
if ($table->is_downloading()) {
$columns[] = 'institution';
$headers[] = get_string('institution');
$columns[] = 'department';
$headers[] = get_string('department');
$columns[] = 'email';
$headers[] = get_string('email');
}
}
示例2: add_user_columns
/**
* Add all the user-related columns to the $columns and $headers arrays.
* @param table_sql $table the table being constructed.
* @param array $columns the list of columns. Added to.
* @param array $headers the columns headings. Added to.
*/
protected function add_user_columns($table, &$columns, &$headers)
{
global $CFG;
if (!$table->is_downloading() && $CFG->grade_report_showuserimage) {
$columns[] = 'picture';
$headers[] = '';
}
if (!$table->is_downloading()) {
$columns[] = 'fullname';
$headers[] = get_string('name');
} else {
$columns[] = 'lastname';
$headers[] = get_string('lastname');
$columns[] = 'firstname';
$headers[] = get_string('firstname');
}
if ($CFG->grade_report_showuseridnumber) {
$columns[] = 'idnumber';
$headers[] = get_string('idnumber');
}
if ($table->is_downloading()) {
$columns[] = 'institution';
$headers[] = get_string('institution');
$columns[] = 'department';
$headers[] = get_string('department');
$columns[] = 'email';
$headers[] = get_string('email');
}
}