mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
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;
|
protected $isApified = true;
|
||||||
|
|
||||||
|
/** @var ObjectsTable */
|
||||||
|
protected $table;
|
||||||
|
|
||||||
protected function checkDirectorPermissions()
|
protected function checkDirectorPermissions()
|
||||||
{
|
{
|
||||||
$this->assertPermission('director/' . $this->getPluralBaseType());
|
$this->assertPermission('director/' . $this->getPluralBaseType());
|
||||||
@ -51,7 +54,7 @@ abstract class ObjectsController extends ActionController
|
|||||||
->addTitle($this->translate(ucfirst(strtolower($type)) . 's'))
|
->addTitle($this->translate(ucfirst(strtolower($type)) . 's'))
|
||||||
->actions(new ObjectsActionBar($type, $this->url()));
|
->actions(new ObjectsActionBar($type, $this->url()));
|
||||||
|
|
||||||
ObjectsTable::create($type, $this->db())
|
$this->table = ObjectsTable::create($type, $this->db())
|
||||||
->setAuth($this->Auth())
|
->setAuth($this->Auth())
|
||||||
->renderTo($this);
|
->renderTo($this);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user