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

Public Member Functions

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

Protected Member Functions

 initializeConfiguration ()
 
array getDokTypes ()
 
array pagesToFlatArray (array $page, int $entryPoint, int $depth=0, array $inheritedData=[])
 
 getPageTreeRepository ()
 
array getAllEntryPointPageTrees (int $startPid=0, string $query='')
 
 calculateBackgroundColors (array $pageIds)
 
string getDomainNameForPage (int $pageId)
 
string getMountPointPath (int $uid)
 
string resolvePageCssClassNames (array $page)
 
bool isDragMoveAllowed ()
 
int[] getAllowedMountPoints ()
 
WorkspaceService getWorkspaceService ()
 
BackendUserAuthentication getBackendUser ()
 
LanguageService null getLanguageService ()
 

Protected Attributes

bool $useNavTitle = false
 
bool $addIdAsPrefix = false
 
bool $addDomainName = false
 
bool $showMountPathAboveMounts = false
 
array $backgroundColors = array( )
 
array $hiddenRecords = array( )
 
array $expandedState = array( )
 
IconFactory $iconFactory
 
int $levelsToFetch = 2
 
bool $expandAllNodes = 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 45 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 109 of file TreeController.php.

Member Function Documentation

◆ calculateBackgroundColors()

TYPO3\CMS\Backend\Controller\Page\TreeController::calculateBackgroundColors ( array  $pageIds)
protected

◆ fetchConfigurationAction()

◆ fetchDataAction()

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

◆ filterDataAction()

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

Returns JSON representing page tree filtered by keyword

Parameters
ServerRequestInterface$request
Returns
‪ResponseInterface

Definition at line 232 of file TreeController.php.

References TYPO3\CMS\Backend\Controller\Page\TreeController\getAllEntryPointPageTrees(), TYPO3\CMS\Backend\Controller\Page\TreeController\initializeConfiguration(), and TYPO3\CMS\Backend\Controller\Page\TreeController\pagesToFlatArray().

◆ getAllEntryPointPageTrees()

array 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 644 of file TreeController.php.

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

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

◆ getBackendUser()

◆ getDokTypes()

array 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".

Returns
‪array

Definition at line 162 of file TreeController.php.

References $GLOBALS, $output, 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()

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

Returns the first configured domain name for a page

Parameters
int$pageId
Returns
‪string

Definition at line 557 of file TreeController.php.

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

◆ getLanguageService()

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

◆ getMountPointPath()

string TYPO3\CMS\Backend\Controller\Page\TreeController::getMountPointPath ( int  $uid)
protected

◆ getPageTreeRepository()

◆ getWorkspaceService()

WorkspaceService TYPO3\CMS\Backend\Controller\Page\TreeController::getWorkspaceService ( )
protected
Returns
‪WorkspaceService

Definition at line 657 of file TreeController.php.

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

◆ initializeConfiguration()

◆ isDragMoveAllowed()

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

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

Returns
‪bool

Definition at line 632 of file TreeController.php.

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

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

◆ pagesToFlatArray()

◆ resolvePageCssClassNames()

string TYPO3\CMS\Backend\Controller\Page\TreeController::resolvePageCssClassNames ( array  $page)
protected

Fetches possible css class names to be used when a record was modified in a workspace

Parameters
array$pagePage record (workspace overlaid)
Returns
‪string CSS class names to be applied

Definition at line 602 of file TreeController.php.

References TYPO3\CMS\Backend\Controller\Page\TreeController\getBackendUser(), TYPO3\CMS\Backend\Controller\Page\TreeController\getWorkspaceService(), and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded().

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

◆ setTemporaryMountPointAction()

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

Sets a temporary mount point

Parameters
ServerRequestInterface$request
Returns
‪ResponseInterface
Exceptions

Definition at line 261 of file TreeController.php.

References TYPO3\CMS\Backend\Controller\Page\TreeController\getBackendUser(), TYPO3\CMS\Backend\Controller\Page\TreeController\getMountPointPath(), and TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\writeUC().

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 63 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 57 of file TreeController.php.

◆ $backgroundColors

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

An array of background colors for a branch in the tree, set via userTS.

Definition at line 75 of file TreeController.php.

◆ $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 104 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 87 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 81 of file TreeController.php.

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

◆ $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 93 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 99 of file TreeController.php.

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

◆ $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 69 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 51 of file TreeController.php.