‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Controller\Page\TreeController Class Reference

Public Member Functions

 __construct ()
 
 fetchConfigurationAction ()
 
 fetchReadOnlyConfigurationAction (ServerRequestInterface $request)
 
 fetchDataAction (ServerRequestInterface $request)
 
 filterDataAction (ServerRequestInterface $request)
 
 setTemporaryMountPointAction (ServerRequestInterface $request)
 

Protected Member Functions

 initializeConfiguration (ServerRequestInterface $request)
 
 getDokTypes ()
 
 pagesToFlatArray (array $page, int $entryPoint, int $depth=0)
 
 initializePageTreeRepository ()
 
 getAllEntryPointPageTrees (int $startPid=0, string $query='')
 
 getDomainNameForPage (int $pageId)
 
 getMountPointPath (int $uid)
 
 isDragMoveAllowed ()
 
int[] getAllowedMountPoints ()
 
 getPostProcessedPageItems (ServerRequestInterface $request, array $items)
 
 getBackendUser ()
 
 getLanguageService ()
 

Protected Attributes

bool $useNavTitle = false
 
bool $addIdAsPrefix = false
 
bool $addDomainName = false
 
bool $showMountPathAboveMounts = false
 
array $hiddenRecords = array( )
 
array $expandedState = array( )
 
IconFactory $iconFactory
 
int $levelsToFetch = 2
 
bool $expandAllNodes = false
 
array $alternativeEntryPoints = []
 
UriBuilder $uriBuilder
 
PageTreeRepository $pageTreeRepository
 
bool $userHasAccessToModifyPagesAndToDefaultLanguage = false
 

Detailed Description

Controller providing data to the page tree

This class is a specific Backend controller implementation and is not considered part of the Public TYPO3 API.

Definition at line 46 of file TreeController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Controller\Page\TreeController::__construct ( )

Constructor to set up common objects needed in various places.

Definition at line 116 of file TreeController.php.

Member Function Documentation

◆ fetchConfigurationAction()

◆ fetchDataAction()

◆ fetchReadOnlyConfigurationAction()

TYPO3\CMS\Backend\Controller\Page\TreeController::fetchReadOnlyConfigurationAction ( ServerRequestInterface  $request)

◆ filterDataAction()

TYPO3\CMS\Backend\Controller\Page\TreeController::filterDataAction ( ServerRequestInterface  $request)

◆ getAllEntryPointPageTrees()

TYPO3\CMS\Backend\Controller\Page\TreeController::getAllEntryPointPageTrees ( int  $startPid = 0,
string  $query = '' 
)
protected

◆ getAllowedMountPoints()

int [] TYPO3\CMS\Backend\Controller\Page\TreeController::getAllowedMountPoints ( )
protected

Get allowed mountpoints. Returns temporary mountpoint when temporary mountpoint is used.

Returns
‪int[]

Definition at line 592 of file TreeController.php.

References TYPO3\CMS\Backend\Controller\Page\TreeController\$alternativeEntryPoints, and TYPO3\CMS\Backend\Controller\Page\TreeController\getBackendUser().

Referenced by TYPO3\CMS\Backend\Controller\Page\TreeController\getAllEntryPointPageTrees().

◆ getBackendUser()

◆ getDokTypes()

TYPO3\CMS\Backend\Controller\Page\TreeController::getDokTypes ( )
protected

Returns the list of doktypes to display in page tree toolbar drag area

Note: The list can be filtered by the user TypoScript option "options.pageTree.doktypesToShowInNewPageDragArea".

Definition at line 194 of file TreeController.php.

References $GLOBALS, $output, TYPO3\CMS\Core\Schema\Struct\SelectItem\fromTcaItemArray(), TYPO3\CMS\Backend\Controller\Page\TreeController\getBackendUser(), TYPO3\CMS\Backend\Controller\Page\TreeController\getLanguageService(), and TYPO3\CMS\Core\Utility\GeneralUtility\intExplode().

Referenced by TYPO3\CMS\Backend\Controller\Page\TreeController\fetchConfigurationAction().

◆ getDomainNameForPage()

TYPO3\CMS\Backend\Controller\Page\TreeController::getDomainNameForPage ( int  $pageId)
protected

Returns the first configured domain name for a page

Definition at line 541 of file TreeController.php.

Referenced by TYPO3\CMS\Backend\Controller\Page\TreeController\pagesToFlatArray().

◆ getLanguageService()

TYPO3\CMS\Backend\Controller\Page\TreeController::getLanguageService ( )
protected

◆ getMountPointPath()

◆ getPostProcessedPageItems()

TYPO3\CMS\Backend\Controller\Page\TreeController::getPostProcessedPageItems ( ServerRequestInterface  $request,
array  $items 
)
protected

◆ initializeConfiguration()

TYPO3\CMS\Backend\Controller\Page\TreeController::initializeConfiguration ( ServerRequestInterface  $request)
protected

◆ initializePageTreeRepository()

◆ isDragMoveAllowed()

TYPO3\CMS\Backend\Controller\Page\TreeController::isDragMoveAllowed ( )
protected

Check if drag-move in the svg tree is allowed for the user

Definition at line 580 of file TreeController.php.

References TYPO3\CMS\Backend\Controller\Page\TreeController\getBackendUser().

Referenced by TYPO3\CMS\Backend\Controller\Page\TreeController\fetchConfigurationAction().

◆ pagesToFlatArray()

TYPO3\CMS\Backend\Controller\Page\TreeController::pagesToFlatArray ( array  $page,
int  $entryPoint,
int  $depth = 0 
)
protected

Converts nested tree structure produced by PageTreeRepository to a flat, one level array and also adds visual representation information to the data.

The result is intended to be used as JSON result - dumping data directly to HTML might lead to XSS!

Parameters
array$page
int$entryPoint
int$depth

Definition at line 316 of file TreeController.php.

References TYPO3\CMS\Webhooks\Message\$identifier, TYPO3\CMS\Backend\Controller\Page\TreeController\getBackendUser(), TYPO3\CMS\Backend\Controller\Page\TreeController\getDomainNameForPage(), TYPO3\CMS\Backend\Controller\Page\TreeController\getLanguageService(), TYPO3\CMS\Backend\Controller\Page\TreeController\getMountPointPath(), TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_DELETE, and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_EDIT.

Referenced by TYPO3\CMS\Backend\Controller\Page\TreeController\fetchDataAction(), and TYPO3\CMS\Backend\Controller\Page\TreeController\filterDataAction().

◆ setTemporaryMountPointAction()

TYPO3\CMS\Backend\Controller\Page\TreeController::setTemporaryMountPointAction ( ServerRequestInterface  $request)

Member Data Documentation

◆ $addDomainName

bool TYPO3\CMS\Backend\Controller\Page\TreeController::$addDomainName = false
protected

Option to prefix the domain name of sys_domains when outputting the tree items, set via userTS.

Definition at line 64 of file TreeController.php.

◆ $addIdAsPrefix

bool TYPO3\CMS\Backend\Controller\Page\TreeController::$addIdAsPrefix = false
protected

Option to prefix the page ID when outputting the tree items, set via userTS.

Definition at line 58 of file TreeController.php.

◆ $alternativeEntryPoints

array TYPO3\CMS\Backend\Controller\Page\TreeController::$alternativeEntryPoints = []
protected

Used in the record link picker to limit the page tree only to a specific list of alternative entry points for selecting only from a list of pages

Definition at line 105 of file TreeController.php.

Referenced by TYPO3\CMS\Backend\Controller\Page\TreeController\getAllEntryPointPageTrees(), and TYPO3\CMS\Backend\Controller\Page\TreeController\getAllowedMountPoints().

◆ $expandAllNodes

bool TYPO3\CMS\Backend\Controller\Page\TreeController::$expandAllNodes = false
protected

When set to true all nodes returend by API will be expanded

Definition at line 99 of file TreeController.php.

◆ $expandedState

array TYPO3\CMS\Backend\Controller\Page\TreeController::$expandedState = array( )
protected

Contains the state of all items that are expanded.

Definition at line 82 of file TreeController.php.

◆ $hiddenRecords

array TYPO3\CMS\Backend\Controller\Page\TreeController::$hiddenRecords = array( )
protected

A list of pages not to be shown.

Definition at line 76 of file TreeController.php.

◆ $iconFactory

IconFactory TYPO3\CMS\Backend\Controller\Page\TreeController::$iconFactory
protected

Instance of the icon factory, to be used for generating the items.

Definition at line 88 of file TreeController.php.

◆ $levelsToFetch

int TYPO3\CMS\Backend\Controller\Page\TreeController::$levelsToFetch = 2
protected

Number of tree levels which should be returned on the first page tree load

Definition at line 94 of file TreeController.php.

Referenced by TYPO3\CMS\Backend\Controller\Page\TreeController\fetchDataAction().

◆ $pageTreeRepository

PageTreeRepository TYPO3\CMS\Backend\Controller\Page\TreeController::$pageTreeRepository
protected

◆ $showMountPathAboveMounts

bool TYPO3\CMS\Backend\Controller\Page\TreeController::$showMountPathAboveMounts = false
protected

Option to add the rootline path above each mount point, set via userTS.

Definition at line 70 of file TreeController.php.

◆ $uriBuilder

UriBuilder TYPO3\CMS\Backend\Controller\Page\TreeController::$uriBuilder
protected

Definition at line 107 of file TreeController.php.

◆ $useNavTitle

bool TYPO3\CMS\Backend\Controller\Page\TreeController::$useNavTitle = false
protected

Option to use the nav_title field for outputting in the tree items, set via userTS.

Definition at line 52 of file TreeController.php.

◆ $userHasAccessToModifyPagesAndToDefaultLanguage

bool TYPO3\CMS\Backend\Controller\Page\TreeController::$userHasAccessToModifyPagesAndToDefaultLanguage = false
protected

Definition at line 111 of file TreeController.php.