Add name property to the delete comment command

refs #11398
This commit is contained in:
Eric Lippmann 2016-08-31 13:00:39 +02:00
parent c55c5a9e64
commit b8df909ad5

View File

@ -17,6 +17,15 @@ class DeleteCommentCommand extends IcingaCommand
*/ */
protected $commentId; protected $commentId;
/**
* Name of the comment (Icinga 2.4+)
*
* Required for removing the comment via Icinga 2's API.
*
* @var string
*/
protected $commentName;
/** /**
* Whether the command affects a service comment * Whether the command affects a service comment
* *
@ -47,6 +56,33 @@ class DeleteCommentCommand extends IcingaCommand
return $this; return $this;
} }
/**
* Get the name of the comment (Icinga 2.4+)
*
* Required for removing the comment via Icinga 2's API.
*
* @return string
*/
public function getCommentName()
{
return $this->commentName;
}
/**
* Set the name of the comment (Icinga 2.4+)
*
* Required for removing the comment via Icinga 2's API.
*
* @param string $commentName
*
* @return $this
*/
public function setCommentName($commentName)
{
$this->commentName = $commentName;
return $this;
}
/** /**
* Get whether the command affects a service comment * Get whether the command affects a service comment
* *