当前位置: 首页>>代码示例>>PHP>>正文


PHP Participant::get_paged_iterated方法代码示例

本文整理汇总了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));
 }
开发者ID:andrejjursa,项目名称:list-lms,代码行数:45,代码来源:participants.php


注:本文中的Participant::get_paged_iterated方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。