ObjectsController: allow child classes to...

...fiddle with our table
This commit is contained in:
Thomas Gelf 2017-07-20 22:29:23 +02:00
parent 44458d2eec
commit 27e38b566d
1 changed files with 4 additions and 1 deletions

View File

@ -23,6 +23,9 @@ abstract class ObjectsController extends ActionController
{
protected $isApified = true;
/** @var ObjectsTable */
protected $table;
protected function checkDirectorPermissions()
{
$this->assertPermission('director/' . $this->getPluralBaseType());
@ -51,7 +54,7 @@ abstract class ObjectsController extends ActionController
->addTitle($this->translate(ucfirst(strtolower($type)) . 's'))
->actions(new ObjectsActionBar($type, $this->url()));
ObjectsTable::create($type, $this->db())
$this->table = ObjectsTable::create($type, $this->db())
->setAuth($this->Auth())
->renderTo($this);
}