diff options
Diffstat (limited to 'library/Icingadb/Hook/ServicesDetailExtensionHook.php')
-rw-r--r-- | library/Icingadb/Hook/ServicesDetailExtensionHook.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/library/Icingadb/Hook/ServicesDetailExtensionHook.php b/library/Icingadb/Hook/ServicesDetailExtensionHook.php new file mode 100644 index 0000000..35ba8d3 --- /dev/null +++ b/library/Icingadb/Hook/ServicesDetailExtensionHook.php @@ -0,0 +1,28 @@ +<?php + +/* Icinga DB Web | (c) 2021 Icinga GmbH | GPLv2 */ + +namespace Icinga\Module\Icingadb\Hook; + +use Icinga\Module\Icingadb\Hook\ExtensionHook\ObjectsDetailExtensionHook; +use Icinga\Module\Icingadb\Model\Service; +use ipl\Html\ValidHtml; +use ipl\Orm\Query; + +abstract class ServicesDetailExtensionHook extends ObjectsDetailExtensionHook +{ + /** + * Assemble and return an HTML representation of the given services + * + * The given query is already pre-filtered with the user's custom filter and restrictions. The base filter does + * only contain the user's custom filter, use this for e.g. subsidiary links. + * + * The query is also limited by default, use `$hosts->limit(null)` to clear that. But beware that this may yield + * a huge result set in case of a bulk selection. + * + * @param Query<Service> $services + * + * @return ValidHtml + */ + abstract public function getHtmlForObjects(Query $services): ValidHtml; +} |