From e040e84e5b722f864db78ec1b033e696f94c24ff Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 18 Apr 2016 13:17:47 +0200 Subject: [PATCH] IcingaObject: add isDisabled helper method --- library/Director/Objects/IcingaObject.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/Director/Objects/IcingaObject.php b/library/Director/Objects/IcingaObject.php index 177bec88..d7885b19 100644 --- a/library/Director/Objects/IcingaObject.php +++ b/library/Director/Objects/IcingaObject.php @@ -484,6 +484,11 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer return parent::reallySet('disabled', $this->normalizeBoolean($disabled)); } + public function isDisabled() + { + return $this->disabled === 'y'; + } + public function markForRemoval($remove = true) { $this->shouldBeRemoved = $remove;