File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1919use Neos \ContentRepository \Domain \Service \NodeTypeManager ;
2020use Neos \ContentRepository \Exception \NodeTypeNotFoundException ;
2121use Neos \Flow \Annotations as Flow ;
22+ use Neos \Flow \Persistence \Doctrine \PersistenceManager ;
2223
2324/**
2425 * @Flow\Scope("singleton")
@@ -37,6 +38,12 @@ class FakeNodeDataFactory
3738 */
3839 protected $ nodeTypeManager ;
3940
41+ /**
42+ * @var PersistenceManager
43+ * @Flow\Inject
44+ */
45+ protected $ persistenceManager ;
46+
4047 /**
4148 * This creates a "fake" removed NodeData instance from the given payload
4249 *
@@ -76,6 +83,11 @@ public function createFromPayload(array $payload)
7683
7784 $ nodeData ->setRemoved (true );
7885
86+ // Ensure, the fake-node is not persisted
87+ if ($ this ->persistenceManager ->isNewObject ($ nodeData )) {
88+ $ this ->persistenceManager ->remove ($ nodeData );
89+ }
90+
7991 return $ nodeData ;
8092 }
8193}
Original file line number Diff line number Diff line change 2424
2525/**
2626 * NodeIndexer for use in batch jobs
27+ *
28+ * @Flow\Scope("singleton")
2729 */
2830class NodeIndexer extends ContentRepositoryAdaptor \Indexer \NodeIndexer
2931{
You can’t perform that action at this time.
0 commit comments