13
13
* source code.
14
14
*/
15
15
16
- use Doctrine \Common \Persistence \ObjectManager ;
17
- use Doctrine \ORM \EntityManager ;
18
16
use Doctrine \ORM \EntityManagerInterface ;
19
17
use Doctrine \ORM \Internal \Hydration \IterableResult ;
20
- use Doctrine \ORM \QueryBuilder ;
21
18
use Flowpack \ElasticSearch \ContentRepositoryAdaptor \Service \NodeTypeIndexingConfiguration ;
22
19
use Neos \ContentRepository \Domain \Model \NodeData ;
23
20
use Neos \Flow \Annotations as Flow ;
@@ -44,14 +41,13 @@ class NodeDataRepository extends Repository
44
41
45
42
/**
46
43
* @param string $workspaceName
47
- * @param string $lastPOI
44
+ * @param string|null $lastPersistenceObjectIdentifier
48
45
* @param int $maxResults
49
46
* @return IterableResult
50
47
* @throws \Flowpack\ElasticSearch\ContentRepositoryAdaptor\Exception
51
48
*/
52
- public function findAllBySiteAndWorkspace (string $ workspaceName , string $ lastPOI = null , int $ maxResults = 1000 ): IterableResult
49
+ public function findAllBySiteAndWorkspace (string $ workspaceName , string $ lastPersistenceObjectIdentifier = null , int $ maxResults = 1000 ): IterableResult
53
50
{
54
- /** @var QueryBuilder $queryBuilder */
55
51
$ queryBuilder = $ this ->entityManager ->createQueryBuilder ();
56
52
$ queryBuilder ->select ('n.Persistence_Object_Identifier persistenceObjectIdentifier, n.identifier identifier, n.dimensionValues dimensions, n.nodeType nodeType, n.path path ' )
57
53
->from (NodeData::class, 'n ' )
@@ -63,15 +59,15 @@ public function findAllBySiteAndWorkspace(string $workspaceName, string $lastPOI
63
59
])
64
60
->orderBy ('n.Persistence_Object_Identifier ' );
65
61
66
- if (!empty ($ lastPOI )) {
67
- $ queryBuilder ->andWhere ($ queryBuilder ->expr ()->gt ('n.Persistence_Object_Identifier ' , $ queryBuilder ->expr ()->literal ($ lastPOI )));
62
+ if (!empty ($ lastPersistenceObjectIdentifier )) {
63
+ $ queryBuilder ->andWhere ($ queryBuilder ->expr ()->gt ('n.Persistence_Object_Identifier ' , $ queryBuilder ->expr ()->literal ($ lastPersistenceObjectIdentifier )));
68
64
}
69
65
70
- $ excludedNodeTypes = array_keys (array_filter ($ this ->nodeTypeIndexingConfiguration ->getIndexableConfiguration (), static function ($ value ) {
66
+ $ excludedNodeTypes = array_keys (array_filter ($ this ->nodeTypeIndexingConfiguration ->getIndexableConfiguration (), static function ($ value ) {
71
67
return !$ value ;
72
68
}));
73
69
74
- if (!empty ($ excludedNodeTypes )) {
70
+ if (!empty ($ excludedNodeTypes )) {
75
71
$ queryBuilder ->andWhere ($ queryBuilder ->expr ()->notIn ('n.nodeType ' , $ excludedNodeTypes ));
76
72
}
77
73
0 commit comments