Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

AbstractSubtree.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Search\Common\Slot;
8
9 use eZ\Publish\Core\Search\Common\Slot;
10
14 abstract class AbstractSubtree extends Slot
15 {
16 protected function indexSubtree($locationId)
17 {
18 $contentHandler = $this->persistenceHandler->contentHandler();
19 $locationHandler = $this->persistenceHandler->locationHandler();
20
21 $processedContentIdSet = [];
22 $subtreeIds = $locationHandler->loadSubtreeIds($locationId);
23 $contentInfoList = $contentHandler->loadContentInfoList(array_values($subtreeIds));
24
25 foreach ($subtreeIds as $locationId => $contentId) {
26 $this->searchHandler->indexLocation(
27 $locationHandler->load($locationId)
28 );
29
30 if (isset($processedContentIdSet[$contentId])) {
31 continue;
32 }
33
34 $this->searchHandler->indexContent(
35 $contentHandler->load(
36 $contentId,
37 $contentInfoList[$contentId]->currentVersionNo
38 )
39 );
40
41 // Content could be found in multiple Locations of the subtree,
42 // but we need to (re)index it only once
43 $processedContentIdSet[$contentId] = true;
44 }
45 }
46 }
eZ\Publish\Core\Search\Common\Slot\AbstractSubtree
A base Search Engine slot providing indexing of the subtree.
Definition: AbstractSubtree.php:15
eZ\Publish\Core\Search\Common\Slot\AbstractSubtree\indexSubtree
indexSubtree($locationId)
Definition: AbstractSubtree.php:16
eZ\Publish\Core\Search\Common\Slot
General slot implementation for Search Engines.
Definition: Search/Common/Slot.php:18
eZ\Publish\Core\Search\Common\Slot
Definition: AbstractSubtree.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.