ProcessChanges: make path optional for deleteNode

This commit is contained in:
Thomas Gelf 2017-01-03 11:30:48 +01:00
parent eb866bf4b1
commit 2dc08be767

View file

@ -96,13 +96,17 @@ class ProcessChanges
/**
* @param Node $node
* @param array $path
*
* @return $this
*/
public function deleteNode(Node $node, array $path)
public function deleteNode(Node $node, array $path = null)
{
$action = new NodeRemoveAction($node);
$action->setPath($path);
if ($path !== null) {
$action->setPath($path);
}
return $this->push($action);
}