Пример #1
0
 /**
  * Prepare controller and model for crud actions
  */
 public function before()
 {
     parent::before();
     CRUD_Tools::init($this->request, $this->response);
     $this->controller_name = $this->request->controller();
     if ($this->model == null) {
         $this->model = $this->request->controller();
     }
     if (is_string($this->model)) {
         $this->model = ORM::factory(Inflector::singular($this->model));
     }
 }