TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
PagePositionMap Class Reference
Inheritance diagram for PagePositionMap:
ContentCreationPagePositionMap ContentLayoutPagePositionMap ContentMovingPagePositionMap PageMovingPagePositionMap

Public Member Functions

 __construct ($pageTreeClassName=null)
 
 boldTitle ($t_code, $dat, $id)
 
 onClickEvent ($pid, $newPagePID)
 
 insertlabel ()
 
 linkPageTitle ($str, $rec)
 
 checkNewPageInPid ($pid)
 
 getModConfig ($pid)
 
 printContentElementColumns ($pid, $moveUid, $colPosList, $showHidden, $R_URI)
 
 printRecordMap ($lines, $colPosArray, $pid=0)
 
 wrapColumnHeader ($str, $vv)
 
 insertPositionIcon ($row, $vv, $kk, $moveUid, $pid)
 
 onClickInsertRecord ($row, $vv, $moveUid, $pid, $sys_lang=0)
 
 wrapRecordHeader ($str, $row)
 
 getRecordHeader ($row)
 
 wrapRecordTitle ($str, $row)
 

Public Attributes

 $moveOrCopy = 'move'
 
 $dontPrintPageInsertIcons = 0
 
 $depth = 2
 
 $cur_sys_language
 
 $R_URI = ''
 
 $elUid = ''
 
 $moveUid = ''
 
 $getModConfigCache = array()
 
 $checkNewPageCache = array()
 
 $l_insertNewPageHere = 'insertNewPageHere'
 
 $l_insertNewRecordHere = 'insertNewRecordHere'
 
 $modConfigStr = 'mod.web_list.newPageWiz'
 

Protected Member Functions

 getBackendUser ()
 
 getLanguageService ()
 
 getDatabase ()
 

Protected Attributes

 $pageTreeClassName = ElementBrowserPageTreeView::class
 
 $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.

Definition at line 30 of file PagePositionMap.php.

Constructor & Destructor Documentation

__construct (   $pageTreeClassName = null)

Constructor allowing to set pageTreeImplementation

Parameters
string$pageTreeClassName

Definition at line 118 of file PagePositionMap.php.

References PagePositionMap\$pageTreeClassName, and GeneralUtility\makeInstance().

Member Function Documentation

boldTitle (   $t_code,
  $dat,
  $id 
)

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

Parameters
string$t_codeTitle string
array$datInfomation array with record array inside.
int$idThe current id.
Returns
string The title string.

Definition at line 235 of file PagePositionMap.php.

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$pidPage id for which to test.
Returns
bool

Definition at line 295 of file PagePositionMap.php.

References PagePositionMap\getBackendUser(), and BackendUtility\getRecord().

getBackendUser ( )
protected

Returns the BackendUser

Returns
BackendUserAuthentication

Definition at line 568 of file PagePositionMap.php.

References $GLOBALS.

Referenced by PagePositionMap\checkNewPageInPid(), and PagePositionMap\onClickInsertRecord().

getDatabase ( )
protected
Returns
DatabaseConnection

Definition at line 586 of file PagePositionMap.php.

References $GLOBALS.

Referenced by PagePositionMap\printContentElementColumns().

getLanguageService ( )
protected

Returns the LanguageService

Returns
LanguageService

Definition at line 578 of file PagePositionMap.php.

References $GLOBALS.

Referenced by PagePositionMap\insertlabel(), PagePositionMap\insertPositionIcon(), and PagePositionMap\printRecordMap().

getModConfig (   $pid)

Returns module configuration for a pid.

Parameters
int$pidPage id for which to get the module configuration.
Returns
array The properties of teh module configuration for the page id.
See Also
onClickEvent()

Definition at line 311 of file PagePositionMap.php.

References BackendUtility\getModTSconfig().

Referenced by PagePositionMap\onClickEvent().

getRecordHeader (   $row)

Create record header (includes teh record icon, record title etc.)

Parameters
array$rowRecord row.
Returns
string HTML

Definition at line 542 of file PagePositionMap.php.

References PagePositionMap\$iconFactory, BackendUtility\getRecordIconAltText(), BackendUtility\getRecordTitle(), BackendUtility\getRecordToolTip(), GeneralUtility\makeInstance(), Icon\SIZE_SMALL, and PagePositionMap\wrapRecordTitle().

Referenced by PagePositionMap\printContentElementColumns().

insertlabel ( )

Get label, htmlspecialchars()'ed

Returns
string The localized label for "insert new page here

Definition at line 271 of file PagePositionMap.php.

References PagePositionMap\getLanguageService().

insertPositionIcon (   $row,
  $vv,
  $kk,
  $moveUid,
  $pid 
)

Creates a linked position icon.

Parameters
mixed$rowElement 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$vvColumn position value.
int$kkColumn key.
int$moveUidMove uid
int$pidPID value.
Returns
string

Definition at line 487 of file PagePositionMap.php.

References PagePositionMap\$moveUid, PagePositionMap\getLanguageService(), and PagePositionMap\onClickInsertRecord().

Referenced by PagePositionMap\printContentElementColumns().

linkPageTitle (   $str,
  $rec 
)

Wrapping page title.

Parameters
string$strPage title.
array$recPage record (?)
Returns
string Wrapped title.

Definition at line 283 of file PagePositionMap.php.

onClickEvent (   $pid,
  $newPagePID 
)

Creates the onclick event for the insert-icons.

TSconfig mod.web_list.newPageWiz.overrideWithExtension may contain an extension which provides a module to be used instead of the normal create new page wizard.

Parameters
int$pidThe pid.
int$newPagePIDNew page id.
Returns
string Onclick attribute content

Definition at line 253 of file PagePositionMap.php.

References BackendUtility\editOnClick(), ExtensionManagementUtility\extRelPath(), PagePositionMap\getModConfig(), ExtensionManagementUtility\isLoaded(), and GeneralUtility\quoteJSvalue().

onClickInsertRecord (   $row,
  $vv,
  $moveUid,
  $pid,
  $sys_lang = 0 
)

Create on-click event value.

Parameters
mixed$rowThe record. If this is not an array with the record data the insert will be for the first position in the column
string$vvColumn position value.
int$moveUidMove uid
int$pidPID value.
int$sys_langSystem language (not used currently)
Returns
string

Definition at line 511 of file PagePositionMap.php.

References PagePositionMap\$moveUid, PagePositionMap\getBackendUser(), and GeneralUtility\quoteJSvalue().

Referenced by PagePositionMap\insertPositionIcon().

printContentElementColumns (   $pid,
  $moveUid,
  $colPosList,
  $showHidden,
  $R_URI 
)

Creates HTML for inserting/moving content elements.

Parameters
int$pidpage id onto which to insert content element.
int$moveUidMove-uid (tt_content element uid?)
string$colPosListList of columns to show
bool$showHiddenIf not set, then hidden/starttime/endtime records are filtered out.
string$R_URIRequest URI
Returns
string HTML

Definition at line 335 of file PagePositionMap.php.

References PagePositionMap\$moveUid, PagePositionMap\$R_URI, BackendUtility\BEenableFields(), BackendUtility\deleteClause(), PagePositionMap\getDatabase(), PagePositionMap\getRecordHeader(), PagePositionMap\insertPositionIcon(), PagePositionMap\printRecordMap(), GeneralUtility\trimExplode(), BackendUtility\versioningPlaceholderClause(), BackendUtility\workspaceOL(), and PagePositionMap\wrapRecordHeader().

printRecordMap (   $lines,
  $colPosArray,
  $pid = 0 
)

Creates the table with the content columns

Parameters
array$linesArray with arrays of lines for each column
array$colPosArrayColumn position array
int$pidThe id of the page
Returns
string HTML

Definition at line 365 of file PagePositionMap.php.

References GeneralUtility\callUserFunction(), elseif, BackendUtility\getLabelFromItemlist(), PagePositionMap\getLanguageService(), and PagePositionMap\wrapColumnHeader().

Referenced by PagePositionMap\printContentElementColumns().

wrapColumnHeader (   $str,
  $vv 
)

Wrapping the column header

Parameters
string$strHeader value
string$vvColumn info.
Returns
string
See Also
printRecordMap()

Definition at line 471 of file PagePositionMap.php.

Referenced by PagePositionMap\printRecordMap().

wrapRecordHeader (   $str,
  $row 
)

Wrapping the record header (from getRecordHeader())

Parameters
string$strHTML content
string$rowRecord array.
Returns
string HTML content

Definition at line 531 of file PagePositionMap.php.

Referenced by PagePositionMap\printContentElementColumns().

wrapRecordTitle (   $str,
  $row 
)

Wrapping the title of the record.

Parameters
string$strThe title value.
array$rowThe record row.
Returns
string Wrapped title string.

Definition at line 558 of file PagePositionMap.php.

References GeneralUtility\linkThisScript().

Referenced by PagePositionMap\getRecordHeader().

Member Data Documentation

$checkNewPageCache = array()

Definition at line 83 of file PagePositionMap.php.

$cur_sys_language

Definition at line 53 of file PagePositionMap.php.

$depth = 2

Definition at line 47 of file PagePositionMap.php.

$dontPrintPageInsertIcons = 0

Definition at line 41 of file PagePositionMap.php.

$elUid = ''

Definition at line 66 of file PagePositionMap.php.

$getModConfigCache = array()

Definition at line 78 of file PagePositionMap.php.

$iconFactory
protected

Definition at line 111 of file PagePositionMap.php.

Referenced by PagePositionMap\getRecordHeader().

$l_insertNewPageHere = 'insertNewPageHere'

Definition at line 89 of file PagePositionMap.php.

$l_insertNewRecordHere = 'insertNewRecordHere'

Definition at line 94 of file PagePositionMap.php.

$modConfigStr = 'mod.web_list.newPageWiz'

Definition at line 99 of file PagePositionMap.php.

$moveOrCopy = 'move'

Definition at line 36 of file PagePositionMap.php.

$moveUid = ''
$pageTreeClassName = ElementBrowserPageTreeView::class
protected

Definition at line 106 of file PagePositionMap.php.

Referenced by PagePositionMap\__construct().

$R_URI = ''

Definition at line 60 of file PagePositionMap.php.

Referenced by PagePositionMap\printContentElementColumns().