當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。