ObjectsController: allow child classes to...
...fiddle with our table
This commit is contained in:
parent
44458d2eec
commit
27e38b566d
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue