public function beforeNodePropertyChange(NodeInterface $node, $propertyName, $oldValue, $value)
{
if (!$this->eventEmittingService->isEnabled()) {
return;
}
if (count($this->currentNodeAddEvents) > 0) {
// add is currently running, during that; we do not want any update events
return;
}
if ($oldValue === $value) {
return;
}
if (!isset($this->changedNodes[$node->getContextPath()])) {
$this->changedNodes[$node->getContextPath()] = array('node' => $node);
}
if (!isset($this->changedNodes[$node->getContextPath()]['oldLabel'])) {
$this->changedNodes[$node->getContextPath()]['oldLabel'] = $node->getLabel();
}
$this->changedNodes[$node->getContextPath()]['old'][$propertyName] = $oldValue;
$this->changedNodes[$node->getContextPath()]['new'][$propertyName] = $value;
}