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

Public Member Functions

 __construct (string $pageTreeClassName=null, string $clientContext='window')
 
string positionTree ($id, $pageinfo, $perms_clause, $R_URI)
 
string boldTitle ($t_code, $dat, $id)
 
string getActionLink ($pid, $newPagePID)
 
string insertlabel ()
 
string linkPageTitle ($str, $rec)
 
bool checkNewPageInPid ($pid)
 
string printContentElementColumns ($pid, $moveUid, $colPosList, $showHidden, $R_URI)
 
string printRecordMap ($lines, $colPosArray, $pid=0)
 
string insertPositionIcon ($row, $vv, $kk, $moveUid, $pid)
 
string onClickInsertRecord ($row, $vv, $moveUid, $pid, $sys_lang=0)
 
string getRecordHeader ($row)
 
string wrapRecordTitle ($str, $row)
 

Public Attributes

string $moveOrCopy = 'move'
 
int $dontPrintPageInsertIcons = 0
 
int $depth = 2
 
int $cur_sys_language
 
string $R_URI = ''
 
string $elUid = ''
 
string $moveUid = ''
 
array $checkNewPageCache = array( )
 
string $l_insertNewPageHere = 'insertNewPageHere'
 
string $l_insertNewRecordHere = 'insertNewRecordHere'
 

Protected Member Functions

BackendUserAuthentication getBackendUser ()
 
LanguageService getLanguageService ()
 

Protected Attributes

string $pageTreeClassName = ElementBrowserPageTreeView::class
 
IconFactory $iconFactory
 
string $clientContext
 

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.

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

Definition at line 38 of file PagePositionMap.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Tree\View\PagePositionMap::__construct ( string  $pageTreeClassName = null,
string  $clientContext = 'window' 
)

Constructor allowing to set pageTreeImplementation

Parameters
string$pageTreeClassName
string$clientContext‪JavaScript context of view client (either 'window' or 'list_frame')

Definition at line 108 of file PagePositionMap.php.

References TYPO3\CMS\Backend\Tree\View\PagePositionMap\$clientContext, and 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 245 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 320 of file PagePositionMap.php.

References TYPO3\CMS\Core\Authentication\BackendUserAuthentication\doesUserHaveAccess(), TYPO3\CMS\Backend\Tree\View\PagePositionMap\getBackendUser(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\isAdmin().

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 263 of file PagePositionMap.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getPagesTSconfig().

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

◆ getBackendUser()

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

◆ getLanguageService()

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

◆ getRecordHeader()

◆ insertlabel()

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

Get label, htmlspecialchars()'ed

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

Definition at line 296 of file PagePositionMap.php.

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

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

◆ insertPositionIcon()

string TYPO3\CMS\Backend\Tree\View\PagePositionMap::insertPositionIcon (   $row,
  $vv,
  $kk,
  $moveUid,
  $pid 
)

Creates a linked position icon.

Parameters
mixed$row‪Element row. If this is an array the link will cause an insert after this content element, otherwise the link will insert at the first position in the column
string$vv‪Column position value.
int$kk‪Column key.
int$moveUid‪Move uid
int$pid‪PID value.
Returns
‪string

Definition at line 510 of file PagePositionMap.php.

References TYPO3\CMS\Backend\Tree\View\PagePositionMap\$moveUid, TYPO3\CMS\Backend\Tree\View\PagePositionMap\getLanguageService(), and TYPO3\CMS\Backend\Tree\View\PagePositionMap\onClickInsertRecord().

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

◆ 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, and TYPO3\CMS\Backend\Tree\View\ContentMovingPagePositionMap.

Definition at line 308 of file PagePositionMap.php.

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

◆ onClickInsertRecord()

string TYPO3\CMS\Backend\Tree\View\PagePositionMap::onClickInsertRecord (   $row,
  $vv,
  $moveUid,
  $pid,
  $sys_lang = 0 
)

Create on-click event value.

Parameters
mixed$row‪The record. If this is not an array with the record data the insert will be for the first position in the column
string$vv‪Column position value.
int$moveUid‪Move uid
int$pid‪PID value.
int$sys_lang‪System language (not used currently)
Returns
‪string

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

Definition at line 534 of file PagePositionMap.php.

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

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

◆ positionTree()

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

◆ printContentElementColumns()

string TYPO3\CMS\Backend\Tree\View\PagePositionMap::printContentElementColumns (   $pid,
  $moveUid,
  $colPosList,
  $showHidden,
  $R_URI 
)

Creates HTML for inserting/moving content elements.

Parameters
int$pid‪page id onto which to insert content element.
int$moveUid‪Move-uid (tt_content element uid?)
string$colPosList‪List of columns to show
bool$showHidden‪If not set, then hidden/starttime/endtime records are filtered out.
string$R_URI‪Request URI
Returns
‪string HTML

Definition at line 344 of file PagePositionMap.php.

References TYPO3\CMS\Backend\Tree\View\PagePositionMap\$moveUid, TYPO3\CMS\Backend\Tree\View\PagePositionMap\$R_URI, TYPO3\CMS\Backend\Tree\View\PagePositionMap\getBackendUser(), TYPO3\CMS\Backend\Tree\View\PagePositionMap\getRecordHeader(), TYPO3\CMS\Backend\Tree\View\PagePositionMap\insertPositionIcon(), TYPO3\CMS\Backend\Tree\View\PagePositionMap\printRecordMap(), TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode(), and TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL().

◆ printRecordMap()

string TYPO3\CMS\Backend\Tree\View\PagePositionMap::printRecordMap (   $lines,
  $colPosArray,
  $pid = 0 
)

◆ wrapRecordTitle()

string TYPO3\CMS\Backend\Tree\View\PagePositionMap::wrapRecordTitle (   $str,
  $row 
)

Wrapping the title of the record.

Parameters
string$str‪The title value.
array$row‪The record row.
Returns
‪string Wrapped title string.

Reimplemented in TYPO3\CMS\Backend\Tree\View\ContentMovingPagePositionMap, and TYPO3\CMS\Backend\Tree\View\ContentCreationPagePositionMap.

Definition at line 575 of file PagePositionMap.php.

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

Member Data Documentation

◆ $checkNewPageCache

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

Definition at line 77 of file PagePositionMap.php.

◆ $clientContext

string TYPO3\CMS\Backend\Tree\View\PagePositionMap::$clientContext
protected

◆ $cur_sys_language

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

Definition at line 57 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 47 of file PagePositionMap.php.

◆ $elUid

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

Definition at line 68 of file PagePositionMap.php.

◆ $iconFactory

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

◆ $l_insertNewPageHere

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

Definition at line 82 of file PagePositionMap.php.

◆ $l_insertNewRecordHere

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

Definition at line 86 of file PagePositionMap.php.

◆ $moveOrCopy

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

Definition at line 43 of file PagePositionMap.php.

◆ $moveUid

◆ $pageTreeClassName

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

Page tree implementation class name

Definition at line 92 of file PagePositionMap.php.

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

◆ $R_URI

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