Ubiquity  2.0.3
php rapid development framework
CRUDController.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Ubiquity\controllers;
4 
6 
7 abstract class CRUDController extends ControllerBase {
8  protected $model;
9  protected $gui;
10 
11  abstract protected function getGui();
12 
16  public function index() {
17  $objects = DAO::getAll ( $this->model );
18  return $this->gui->renderObjects ( $objects );
19  }
20 }
21 
static getAll($className, $condition='', $loadManyToOne=true, $loadOneToMany=false, $useCache=NULL)
Returns an array of $className objects from the database.
Definition: DAO.php:193
index()
Default page : list all objects.
This file is part of Ubiquity framework.