diff --git a/Classes/NodeSignalInterceptor.php b/Classes/NodeSignalInterceptor.php index 72efbdc..5f91270 100644 --- a/Classes/NodeSignalInterceptor.php +++ b/Classes/NodeSignalInterceptor.php @@ -19,6 +19,12 @@ */ class NodeSignalInterceptor { + /** + * @Flow\InjectConfiguration(path="triggerMode") + * @var array + */ + protected $triggerMode = [ 'create' => true, 'update' => true ]; + /** * @Flow\InjectConfiguration(path="sortingInstructions") * @var array @@ -38,6 +44,8 @@ class NodeSignalInterceptor */ public function nodeAdded(NodeInterface $node) { + if (!$this->triggerMode['create']) { return; } + if (!array_key_exists($node->getNodeType()->getName(), $this->sortingInstructions)) { return; } @@ -53,6 +61,8 @@ public function nodeAdded(NodeInterface $node) */ public function nodeUpdated(NodeInterface $node) { + if (!$this->triggerMode['update']) { return; } + if($this->createArchivist()->isNodeInProcess($node)) { return; } diff --git a/Configuration/Settings.yaml b/Configuration/Settings.yaml index f464232..ee7d237 100644 --- a/Configuration/Settings.yaml +++ b/Configuration/Settings.yaml @@ -2,3 +2,10 @@ Neos: Fusion: defaultContext: Archivist: 'PunktDe\Archivist\Eel\ArchivistHelper' + +PunktDe: + Archivist: + # when to trigger the organizeNode logic + triggerMode: + create: true + update: true