ObjectsController: allow to override ApplyRulesTbl

This commit is contained in:
Thomas Gelf 2019-04-10 17:19:17 +02:00
parent 3ac99d6be3
commit 5a36735400

View File

@ -133,6 +133,20 @@ abstract class ObjectsController extends ActionController
->setBaseObjectUrl($this->getBaseObjectUrl());
}
/**
* @return ApplyRulesTable
* @throws NotFoundError
*/
protected function getApplyRulesTable()
{
$table = new ApplyRulesTable($this->db());
$table->setType($this->getType())
->setBaseObjectUrl($this->getBaseObjectUrl());
$this->eventuallyFilterCommand($table);
return $table;
}
/**
* @throws NotFoundError
*/
@ -263,11 +277,7 @@ abstract class ObjectsController extends ActionController
)
);
$table = new ApplyRulesTable($this->db());
$table->setType($this->getType())
->setBaseObjectUrl($this->getBaseObjectUrl());
$this->eventuallyFilterCommand($table);
$table->renderTo($this);
$this->getApplyRulesTable()->renderTo($this);
}
/**