expireTime = $expireTime !== null ? (int) $expireTime : null; return parent::disable(); } /** * (non-PHPDoc) * @see \Icinga\Module\Monitoring\Command\IcingaCommand::getCommandString() For the method documentation. */ public function getCommandString() { if ($this->enable === true) { return 'ENABLE_NOTIFICATIONS'; } if ($this->expireTime !== null) { return sprintf( '%s;%u;%u', 'DISABLE_NOTIFICATIONS_EXPIRE_TIME', time(), // Schedule time. According to the Icinga documentation schedule time has no effect currently // and should be set to the current timestamp. $this->expireTime ); } return 'DISABLE_NOTIFICATIONS'; } }