本文整理汇总了PHP中Participant::get_paged_iterated方法的典型用法代码示例。如果您正苦于以下问题:PHP Participant::get_paged_iterated方法的具体用法?PHP Participant::get_paged_iterated怎么用?PHP Participant::get_paged_iterated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Participant
的用法示例。
在下文中一共展示了Participant::get_paged_iterated方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: table_content
public function table_content()
{
$filter = $this->input->post('filter');
$this->store_filter($filter);
$participants = new Participant();
$participants->include_related('student', 'fullname');
$participants->include_related('student', 'email');
$participants->include_related('course', 'name');
$participants->include_related('course/period', 'name');
$participants->include_related('group', 'name');
if (isset($filter['student_fullname']) && trim($filter['student_fullname']) != '') {
$participants->like_related('student', 'fullname', trim($filter['student_fullname']));
}
if (isset($filter['course']) && intval($filter['course']) > 0) {
$participants->where_related('course', 'id', intval($filter['course']));
}
if (isset($filter['group']) && intval($filter['group']) > 0) {
$participants->where_related('group', 'id', intval($filter['group']));
}
if (isset($filter['group_set'])) {
if ($filter['group_set'] == 'none') {
$participants->where('group_id', NULL);
} else {
if ($filter['group_set'] == 'assigned') {
$participants->group_start(' NOT', 'AND');
$participants->where('group_id', NULL);
$participants->group_end();
}
}
}
$order_by_direction = $filter['order_by_direction'] == 'desc' ? 'desc' : 'asc';
if ($filter['order_by_field'] == 'student') {
$participants->order_by_related_as_fullname('student', 'fullname', $order_by_direction);
$participants->order_by_related('student', 'email', $order_by_direction);
} elseif ($filter['order_by_field'] == 'course') {
$participants->order_by_related('course/period', 'sorting', $order_by_direction);
$participants->order_by_related_with_constant('course', 'name', $order_by_direction);
} elseif ($filter['order_by_field'] == 'group') {
$participants->order_by_related_with_constant('group', 'name', $order_by_direction);
} elseif ($filter['order_by_field'] == 'status') {
$participants->order_by('allowed', $order_by_direction);
}
$participants->get_paged_iterated(isset($filter['page']) ? intval($filter['page']) : 1, isset($filter['rows_per_page']) ? intval($filter['rows_per_page']) : 25);
$this->parser->parse('backend/participants/table_content.tpl', array('participants' => $participants));
}