示例#1
0
 /**
  * Render filter
  * @return object {data, pagination}
  */
 function render()
 {
     $result = new collection_filter_result();
     $data = $this->render_with_meta ? $this->collection->render2edt(true) : $this->collection->render();
     $result->collection = $data;
     $result->pagination = $this->pagination;
     $result->filters = $this->render_filters();
     $result->orders = $this->get_orders();
     if (core::is_debug()) {
         $result->sql = $this->collection->get_last_query();
     }
     // if template specified, render it
     if ($this->template) {
         $result->data = \View::make($this->template, array('data' => $result->data))->render();
     }
     return $result;
 }