2015-03-16 04:08:00 -04:00
|
|
|
<?php
|
|
|
|
|
|
2016-11-23 06:27:55 -05:00
|
|
|
namespace Icinga\Module\Businessprocess\Modification;
|
|
|
|
|
|
|
|
|
|
use Icinga\Module\Businessprocess\BusinessProcess;
|
2015-03-16 04:08:00 -04:00
|
|
|
|
2016-11-22 15:11:26 -05:00
|
|
|
/**
|
|
|
|
|
* NodeRemoveAction
|
|
|
|
|
*
|
|
|
|
|
* Tracks removed nodes
|
|
|
|
|
*
|
|
|
|
|
* @package Icinga\Module\Businessprocess
|
|
|
|
|
*/
|
2015-03-16 04:08:00 -04:00
|
|
|
class NodeRemoveAction extends NodeAction
|
|
|
|
|
{
|
2016-11-22 15:11:26 -05:00
|
|
|
/**
|
|
|
|
|
* @inheritdoc
|
|
|
|
|
*/
|
2015-03-16 04:08:00 -04:00
|
|
|
public function appliesTo(BusinessProcess $bp)
|
|
|
|
|
{
|
|
|
|
|
return $bp->hasNode($this->getNodeName());
|
|
|
|
|
}
|
|
|
|
|
|
2016-11-22 15:11:26 -05:00
|
|
|
/**
|
|
|
|
|
* @inheritdoc
|
|
|
|
|
*/
|
2015-03-16 04:08:00 -04:00
|
|
|
public function applyTo(BusinessProcess $bp)
|
|
|
|
|
{
|
|
|
|
|
$bp->removeNode($this->getNodeName());
|
|
|
|
|
}
|
|
|
|
|
}
|