‪TYPO3CMS  11.5
TYPO3\CMS\Backend\Tree\View\PagePositionMap Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Tree\View\PagePositionMap:
TYPO3\CMS\Backend\Tree\View\PageMovingPagePositionMap

Public Member Functions

 __construct (?string $pageTreeClassName=null)
 
string positionTree ($id, $pageinfo, $perms_clause, $R_URI)
 
string boldTitle ($t_code, $dat, $id)
 
string getActionLink ($pid, $newPagePID)
 
string linkPageTitle ($str, $rec)
 
bool checkNewPageInPid ($pid)
 

Public Attributes

string $moveOrCopy = 'move'
 
int $dontPrintPageInsertIcons = 0
 
int $depth = 2
 
string $R_URI = ''
 
int $moveUid
 
array $checkNewPageCache = array( )
 

Protected Member Functions

string insertlabel ()
 
BackendUserAuthentication getBackendUser ()
 
LanguageService getLanguageService ()
 

Protected Attributes

string $pageTreeClassName = PageTreeView::class
 
IconFactory $iconFactory
 

Detailed Description

Position map class - generating a page tree / content element list which links for inserting (copy/move) of records. Used for pages / tt_content element wizards of various kinds.

Moving of Content to a certain position of a page happens in the ContentMovingPagePositionMap.

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

Definition at line 35 of file PagePositionMap.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Tree\View\PagePositionMap::__construct ( ?string  $pageTreeClassName = null)

Constructor allowing to set pageTreeImplementation

Parameters
string | null$pageTreeClassName

Definition at line 81 of file PagePositionMap.php.

References TYPO3\CMS\Backend\Tree\View\PagePositionMap\$pageTreeClassName.

Member Function Documentation

◆ boldTitle()

string TYPO3\CMS\Backend\Tree\View\PagePositionMap::boldTitle (   $t_code,
  $dat,
  $id 
)

Wrap $t_code in bold IF the $dat uid matches $id

Parameters
string$t_code‪Title string
array$dat‪Information array with record array inside.
int$id‪The current id.
Returns
‪string The title string.

Reimplemented in TYPO3\CMS\Backend\Tree\View\PageMovingPagePositionMap.

Definition at line 216 of file PagePositionMap.php.

Referenced by TYPO3\CMS\Backend\Tree\View\PagePositionMap\positionTree().

◆ checkNewPageInPid()

bool TYPO3\CMS\Backend\Tree\View\PagePositionMap::checkNewPageInPid (   $pid)

Checks if the user has permission to created pages inside of the $pid page. Uses caching so only one regular lookup is made - hence you can call the function multiple times without worrying about performance.

Parameters
int$pid‪Page id for which to test.
Returns
‪bool

Definition at line 291 of file PagePositionMap.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\doesUserHaveAccess(), TYPO3\CMS\Backend\Tree\View\PagePositionMap\getBackendUser(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin(), and TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_NEW.

Referenced by TYPO3\CMS\Backend\Tree\View\PagePositionMap\positionTree().

◆ getActionLink()

string TYPO3\CMS\Backend\Tree\View\PagePositionMap::getActionLink (   $pid,
  $newPagePID 
)

Creates the onclick event for the insert-icons.

TSconfig mod.newPageWizard.override may contain an alternative module / route which can be used instead of the normal create new page wizard.

Parameters
int$pid‪The pid.
int$newPagePID‪New page id.
Returns
‪string Onclick attribute content

Reimplemented in TYPO3\CMS\Backend\Tree\View\PageMovingPagePositionMap.

Definition at line 234 of file PagePositionMap.php.

Referenced by TYPO3\CMS\Backend\Tree\View\PagePositionMap\positionTree().

◆ getBackendUser()

BackendUserAuthentication TYPO3\CMS\Backend\Tree\View\PagePositionMap::getBackendUser ( )
protected

Returns the BackendUser

Returns
‪BackendUserAuthentication

Definition at line 305 of file PagePositionMap.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Tree\View\PagePositionMap\checkNewPageInPid(), and TYPO3\CMS\Backend\Tree\View\PagePositionMap\positionTree().

◆ getLanguageService()

LanguageService TYPO3\CMS\Backend\Tree\View\PagePositionMap::getLanguageService ( )
protected

Returns the LanguageService

Returns
‪LanguageService

Definition at line 315 of file PagePositionMap.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Tree\View\PageMovingPagePositionMap\insertlabel(), and TYPO3\CMS\Backend\Tree\View\PagePositionMap\insertlabel().

◆ insertlabel()

string TYPO3\CMS\Backend\Tree\View\PagePositionMap::insertlabel ( )
protected

Get label, htmlspecialchars()'ed

Returns
‪string The localized label for "insert new page here"

Reimplemented in TYPO3\CMS\Backend\Tree\View\PageMovingPagePositionMap.

Definition at line 267 of file PagePositionMap.php.

References TYPO3\CMS\Backend\Tree\View\PagePositionMap\getLanguageService().

Referenced by TYPO3\CMS\Backend\Tree\View\PagePositionMap\positionTree().

◆ linkPageTitle()

string TYPO3\CMS\Backend\Tree\View\PagePositionMap::linkPageTitle (   $str,
  $rec 
)

Wrapping page title.

Parameters
string$str‪Page title.
array$rec‪Page record (?)
Returns
‪string Wrapped title.

Reimplemented in TYPO3\CMS\Backend\Tree\View\PageMovingPagePositionMap.

Definition at line 279 of file PagePositionMap.php.

Referenced by TYPO3\CMS\Backend\Tree\View\PagePositionMap\positionTree().

◆ positionTree()

string TYPO3\CMS\Backend\Tree\View\PagePositionMap::positionTree (   $id,
  $pageinfo,
  $perms_clause,
  $R_URI 
)

Member Data Documentation

◆ $checkNewPageCache

array TYPO3\CMS\Backend\Tree\View\PagePositionMap::$checkNewPageCache = array( )

Definition at line 64 of file PagePositionMap.php.

◆ $depth

int TYPO3\CMS\Backend\Tree\View\PagePositionMap::$depth = 2

◆ $dontPrintPageInsertIcons

int TYPO3\CMS\Backend\Tree\View\PagePositionMap::$dontPrintPageInsertIcons = 0

Definition at line 44 of file PagePositionMap.php.

◆ $iconFactory

IconFactory TYPO3\CMS\Backend\Tree\View\PagePositionMap::$iconFactory
protected

Definition at line 74 of file PagePositionMap.php.

◆ $moveOrCopy

string TYPO3\CMS\Backend\Tree\View\PagePositionMap::$moveOrCopy = 'move'

Definition at line 40 of file PagePositionMap.php.

◆ $moveUid

int TYPO3\CMS\Backend\Tree\View\PagePositionMap::$moveUid

Definition at line 60 of file PagePositionMap.php.

◆ $pageTreeClassName

string TYPO3\CMS\Backend\Tree\View\PagePositionMap::$pageTreeClassName = PageTreeView::class
protected

Page tree implementation class name

Definition at line 70 of file PagePositionMap.php.

Referenced by TYPO3\CMS\Backend\Tree\View\PagePositionMap\__construct().

◆ $R_URI

string TYPO3\CMS\Backend\Tree\View\PagePositionMap::$R_URI = ''