2 declare(strict_types = 1);
39 protected $siteMatcher;
44 public function setSite(
Site $site):
void
52 public function getSite():
Site
68 protected function filterContainedInSite(array $results): array
70 if (empty($results)) {
75 function (array $result) {
78 $pageId = (int)$result[
'pid'];
79 return $this->isPageIdContainedInSite($pageId);
91 protected function isPageIdContainedInSite(
int $pageId):
bool
94 $expectedSite = $this->getSiteMatcher()->matchByPageId($pageId);
95 return $expectedSite->getRootPageId() === $this->site->getRootPageId();
107 if (!isset($this->siteMatcher)) {
108 $this->siteMatcher = GeneralUtility::makeInstance(SiteMatcher::class);
110 return $this->siteMatcher;