Links: Add methods users and event

This commit is contained in:
Johannes Meyer 2021-06-08 13:01:48 +02:00
parent ba1c67a5bc
commit ce5b249a64

View file

@ -6,7 +6,9 @@ namespace Icinga\Module\Icingadb\Common;
use Icinga\Module\Icingadb\Model\Comment;
use Icinga\Module\Icingadb\Model\Downtime;
use Icinga\Module\Icingadb\Model\History;
use Icinga\Module\Icingadb\Model\Host;
use Icinga\Module\Icingadb\Model\NotificationHistory;
use Icinga\Module\Icingadb\Model\Service;
use Icinga\Module\Icingadb\Model\User;
use Icinga\Module\Icingadb\Model\Usergroup;
@ -123,4 +125,14 @@ abstract class Links
{
return Url::fromPath('icingadb/usergroup', ['name' => $usergroup->name]);
}
public static function users()
{
return Url::fromPath('icingadb/users');
}
public static function event(History $event)
{
return Url::fromPath('icingadb/event', ['id' => bin2hex($event->id)]);
}
}