|
@@ -3,6 +3,7 @@
|
|
|
namespace Opentalent\OtTemplating\Page;
|
|
namespace Opentalent\OtTemplating\Page;
|
|
|
|
|
|
|
|
use FluidTYPO3\Vhs\Service\PageService;
|
|
use FluidTYPO3\Vhs\Service\PageService;
|
|
|
|
|
+use TYPO3\CMS\Core\Database\ConnectionPool;
|
|
|
use TYPO3\CMS\Core\Exception\SiteNotFoundException;
|
|
use TYPO3\CMS\Core\Exception\SiteNotFoundException;
|
|
|
use TYPO3\CMS\Core\Site\SiteFinder;
|
|
use TYPO3\CMS\Core\Site\SiteFinder;
|
|
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
@@ -60,6 +61,9 @@ class OtPageRepository extends PageRepository
|
|
|
return [];
|
|
return [];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Recursively returns all the subpages of the given page
|
|
* Recursively returns all the subpages of the given page
|
|
|
*
|
|
*
|
|
@@ -69,13 +73,15 @@ class OtPageRepository extends PageRepository
|
|
|
public function getAllSubpagesForPage($pageUid) {
|
|
public function getAllSubpagesForPage($pageUid) {
|
|
|
$subpages = [];
|
|
$subpages = [];
|
|
|
|
|
|
|
|
- $stack = $this->getSubpagesForPages(
|
|
|
|
|
- [$pageUid],
|
|
|
|
|
- '*',
|
|
|
|
|
- 'sorting',
|
|
|
|
|
- '',
|
|
|
|
|
- false
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
|
|
|
|
|
+ ->getQueryBuilderForTable('pages');
|
|
|
|
|
+ $queryBuilder->getRestrictions()->removeAll();
|
|
|
|
|
+ $stack = $queryBuilder
|
|
|
|
|
+ ->select('*')
|
|
|
|
|
+ ->from('pages')
|
|
|
|
|
+ ->where($queryBuilder->expr()->eq('pid', $pageUid))
|
|
|
|
|
+ ->execute()
|
|
|
|
|
+ ->fetchAll();
|
|
|
|
|
|
|
|
foreach ($stack as $page) {
|
|
foreach ($stack as $page) {
|
|
|
$subpages[] = $page;
|
|
$subpages[] = $page;
|