Exemplo n.º 1
0
Arquivo: crud.php Projeto: raku/MorCMS
 /**
  * Show data in grid from view
  */
 public function GET_show()
 {
     $view = new View('crud/' . $this->view . '/grid');
     $view->name = $this->controller_name;
     $view->filters = CRUD_Tools::get_param('id');
     foreach ($view->filters as $filter => $value) {
         $this->model->add_filter($filter, $value);
     }
     $view->data = $this->model->get_array();
     $view->columns = $this->model->get_items();
     $view->base_controller = $this->base_controller;
     $view->pagination = null;
     $view->sortable = $this->model->is_sortable();
     if ($this->model->render_pagination()) {
         $view->pagination = $this->model->render_pagination();
     }
     $this->template->content = $view->render();
 }