Beispiel #1
0
 public function get()
 {
     $page = Request::getQuery('page', 1);
     $per = Configuration::getInstance()->per;
     $start = ($page - 1) * $per;
     $paginas = array();
     $count = 0;
     $pos = 0;
     if ($this->inmueble->found()) {
         $paginas = Inmuebles_Paginas::allContenido(array('inmueble_id' => $this->inmueble->id), array($start, $per));
         $count = Inmuebles_Paginas::count(array('inmueble_id' => $this->inmueble->id));
         $pos = Inmuebles_Paginas::pos($this->inmueble->id);
     }
     return array('idiomas' => Translate::all(), 'codigo' => $this->codigo, 'inmueble' => $this->inmueble, 'paginas' => $paginas, 'count' => $count, 'start' => $start, 'page' => $page, 'per' => $per, 'pos' => $pos);
 }