icingaweb2-module-director/library/Director/Hook/BranchSupportHook.php

39 lines
1005 B
PHP
Raw Normal View History

2021-08-16 11:43:09 +02:00
<?php
namespace Icinga\Module\Director\Hook;
2021-08-23 08:53:40 +02:00
use Icinga\Authentication\Auth;
2021-08-16 11:43:09 +02:00
use Icinga\Module\Director\Data\Db\DbObject;
use Icinga\Module\Director\Db\Branch\Branch;
2021-08-23 08:53:40 +02:00
use Icinga\Module\Director\Db\Branch\BranchSTore;
2021-08-16 11:43:09 +02:00
use Icinga\Web\Request;
2021-08-23 08:53:40 +02:00
use ipl\Html\ValidHtml;
2021-08-16 11:43:09 +02:00
abstract class BranchSupportHook
{
2021-08-23 08:53:40 +02:00
/**
* @param Request $request
* @param BranchSTore $store
* @param Auth $auth
* @return Branch
*/
abstract public function getBranchForRequest(Request $request, BranchStore $store, Auth $auth);
2021-08-16 11:43:09 +02:00
2021-08-23 08:53:40 +02:00
/**
* @param Branch $branch
* @param Auth $auth
* @param ?string $label
* @return ?ValidHtml
*/
abstract public function linkToBranch(Branch $branch, Auth $auth, $label = null);
2021-08-16 11:43:09 +02:00
2021-08-23 08:53:40 +02:00
/**
* @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);
2021-08-16 11:43:09 +02:00
}