icingaweb2-module-businessp.../library/Businessprocess/Modification/NodeRemoveAction.php

32 lines
553 B
PHP
Raw Normal View History

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