BranchSupportHook: smaller changes

This commit is contained in:
Thomas Gelf 2021-08-23 08:53:40 +02:00
parent 5002f7a6bf
commit 04f3c6363e
1 changed files with 25 additions and 3 deletions

View File

@ -2,15 +2,37 @@
namespace Icinga\Module\Director\Hook;
use Icinga\Authentication\Auth;
use Icinga\Module\Director\Data\Db\DbObject;
use Icinga\Module\Director\Db\Branch\Branch;
use Icinga\Module\Director\Db\Branch\BranchSTore;
use Icinga\Web\Request;
use ipl\Html\ValidHtml;
abstract class BranchSupportHook
{
abstract public function getBranchForRequest(Request $request);
/**
* @param Request $request
* @param BranchSTore $store
* @param Auth $auth
* @return Branch
*/
abstract public function getBranchForRequest(Request $request, BranchStore $store, Auth $auth);
abstract public function linkToBranch(Branch $branch, $label = null);
/**
* @param Branch $branch
* @param Auth $auth
* @param ?string $label
* @return ?ValidHtml
*/
abstract public function linkToBranch(Branch $branch, Auth $auth, $label = null);
abstract public function linkToBranchedObject($label, Branch $branch, DbObject $object);
/**
* @param string $label
* @param Branch $branch
* @param DbObject $object
* @param Auth $auth
* @return ?ValidHtml
*/
abstract public function linkToBranchedObject($label, Branch $branch, DbObject $object, Auth $auth);
}