summaryrefslogtreecommitdiffstats
path: root/library/Director/ProvidedHook/IcingaDbCubeLinks.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Director/ProvidedHook/IcingaDbCubeLinks.php')
-rw-r--r--library/Director/ProvidedHook/IcingaDbCubeLinks.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/library/Director/ProvidedHook/IcingaDbCubeLinks.php b/library/Director/ProvidedHook/IcingaDbCubeLinks.php
index 234f61f..f3fe402 100644
--- a/library/Director/ProvidedHook/IcingaDbCubeLinks.php
+++ b/library/Director/ProvidedHook/IcingaDbCubeLinks.php
@@ -7,6 +7,7 @@ use Icinga\Exception\ProgrammingError;
use Icinga\Module\Cube\Hook\IcingaDbActionsHook;
use Icinga\Module\Cube\IcingaDb\IcingaDbCube;
use Icinga\Module\Cube\IcingaDb\IcingaDbHostStatusCube;
+use ipl\Stdlib\Filter\Condition;
class IcingaDbCubeLinks extends IcingaDbActionsHook
{
@@ -25,17 +26,19 @@ class IcingaDbCubeLinks extends IcingaDbActionsHook
if ($filterChain->count() === 1) {
$url = 'director/host/edit?';
- $params = ['name' => $filterChain->getIterator()->current()->getValue()];
+ /** @var Condition $rule */
+ $rule = $filterChain->getIterator()->current();
+ /** @var string $name */
+ $name = $rule->getValue();
+ $params = ['name' => $name];
$title = t('Modify a host');
- $description = sprintf(
- t('This allows you to modify properties for "%s"'),
- $filterChain->getIterator()->current()->getValue()
- );
+ $description = sprintf(t('This allows you to modify properties for "%s"'), $name);
} else {
$params = null;
$urlFilter = Filter::matchAny();
+ /** @var Condition $filter */
foreach ($filterChain as $filter) {
$urlFilter->addFilter(
Filter::matchAny(