blob: 6615cbe012cb383961270bdba28dba044624c2b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<?php
namespace Icinga\Module\Director\Hook;
use Icinga\Authentication\Auth;
use Icinga\Module\Director\Dashboard\Dashlet\Dashlet;
use Icinga\Module\Director\Db;
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
{
/**
* @param Request $request
* @param BranchSTore $store
* @param Auth $auth
* @return Branch
*/
abstract public function getBranchForRequest(Request $request, BranchStore $store, Auth $auth);
/**
* @param Branch $branch
* @param Auth $auth
* @param ?string $label
* @return ?ValidHtml
*/
abstract public function linkToBranch(Branch $branch, Auth $auth, $label = null);
/**
* @param Db $db
* @return Dashlet[]
*/
public function loadDashlets(Db $db)
{
return [];
}
}
|