‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\View\BackendLayoutView Class Reference
Inheritance diagram for TYPO3\CMS\Backend\View\BackendLayoutView:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 __construct (private readonly DataProviderCollection $dataProviderCollection, private readonly TypoScriptStringFactory $typoScriptStringFactory,)
 
 addBackendLayoutItems (array &$parameters)
 
bool string getSelectedCombinedIdentifier ($pageId)
 
 colPosListItemProcFunc (array $parameters)
 
array getColPosListItemsParsed ($id)
 
array null getSelectedBackendLayout ($pageId)
 
BackendLayout getBackendLayoutForPage (int $pageId)
 
 parseStructure (BackendLayout $backendLayout)
 

Static Public Member Functions

static string getDefaultColumnLayout ()
 

Protected Member Functions

int false determinePageId ($tableName, array $data)
 
array getIdentifiersToBeExcluded (array $pageTSconfig)
 
array addColPosListLayoutItems ($pageId, $items)
 
array addItems ($items, $iArray)
 
array false null getPage ($pageId)
 
array getRootLine ($pageId)
 
DataProviderContext createDataProviderContext ()
 
 getLanguageService ()
 
string getColumnName ($column)
 

Protected Attributes

array $selectedCombinedIdentifier = []
 
array $selectedBackendLayout = []
 

Detailed Description

Backend layout for CMS

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

Definition at line 37 of file BackendLayoutView.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\View\BackendLayoutView::__construct ( private readonly DataProviderCollection  $dataProviderCollection,
private readonly TypoScriptStringFactory  $typoScriptStringFactory 
)

Create this object and initialize data providers.

Definition at line 45 of file BackendLayoutView.php.

References $GLOBALS, and TYPO3\CMS\Webhooks\Message\$identifier.

Member Function Documentation

◆ addBackendLayoutItems()

TYPO3\CMS\Backend\View\BackendLayoutView::addBackendLayoutItems ( array &  $parameters)

Gets backend layout items to be shown in the forms engine. This method is called as "itemsProcFunc" with the accordant context for pages.backend_layout and pages.backend_layout_next_level. Also used in the info module, since we need those items with the appropriate labels and backend layout identifiers there, too.

Todo:
‪This method should return the items array instead of using the whole parameters array as reference. This has to be adjusted, as soon as the itemsProcFunc functionality is changed in this regard.

Definition at line 70 of file BackendLayoutView.php.

References TYPO3\CMS\Backend\View\BackendLayoutView\createDataProviderContext(), TYPO3\CMS\Backend\View\BackendLayoutView\determinePageId(), TYPO3\CMS\Backend\View\BackendLayoutView\getIdentifiersToBeExcluded(), TYPO3\CMS\Backend\View\BackendLayoutView\getLanguageService(), TYPO3\CMS\Backend\View\BackendLayout\DataProviderContext\setData(), TYPO3\CMS\Backend\View\BackendLayout\DataProviderContext\setFieldName(), TYPO3\CMS\Backend\View\BackendLayout\DataProviderContext\setPageId(), TYPO3\CMS\Backend\View\BackendLayout\DataProviderContext\setPageTsConfig(), and TYPO3\CMS\Backend\View\BackendLayout\DataProviderContext\setTableName().

◆ addColPosListLayoutItems()

array TYPO3\CMS\Backend\View\BackendLayoutView::addColPosListLayoutItems (   $pageId,
  $items 
)
protected

◆ addItems()

array TYPO3\CMS\Backend\View\BackendLayoutView::addItems (   $items,
  $iArray 
)
protected

Merges items into an item-array, optionally with an icon example: TCEFORM.pages.doktype.addItems.13 = My Label TCEFORM.pages.doktype.addItems.13.icon = EXT:t3skin/icons/gfx/i/pages.gif

Parameters
array$items‪The existing item array
array$iArray‪An array of items to add. NOTICE: The keys are mapped to values, and the values and mapped to be labels. No possibility of adding an icon.
Returns
‪array The updated $item array

Definition at line 278 of file BackendLayoutView.php.

References TYPO3\CMS\Backend\View\BackendLayoutView\getLanguageService().

Referenced by TYPO3\CMS\Backend\View\BackendLayoutView\getColPosListItemsParsed().

◆ colPosListItemProcFunc()

TYPO3\CMS\Backend\View\BackendLayoutView::colPosListItemProcFunc ( array  $parameters)

Gets colPos items to be shown in the forms engine. This method is called as "itemsProcFunc" with the accordant context for tt_content.colPos.

Definition at line 215 of file BackendLayoutView.php.

References TYPO3\CMS\Backend\View\BackendLayoutView\addColPosListLayoutItems(), and TYPO3\CMS\Backend\View\BackendLayoutView\determinePageId().

◆ createDataProviderContext()

DataProviderContext TYPO3\CMS\Backend\View\BackendLayoutView::createDataProviderContext ( )
protected
Returns
‪DataProviderContext

Definition at line 446 of file BackendLayoutView.php.

Referenced by TYPO3\CMS\Backend\View\BackendLayoutView\addBackendLayoutItems().

◆ determinePageId()

int false TYPO3\CMS\Backend\View\BackendLayoutView::determinePageId (   $tableName,
array  $data 
)
protected

Determines the page id for a given record of a database table.

Parameters
string$tableName
Returns
‪int|false Returns page id or false on error

Definition at line 112 of file BackendLayoutView.php.

References TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Backend\View\BackendLayoutView\addBackendLayoutItems(), and TYPO3\CMS\Backend\View\BackendLayoutView\colPosListItemProcFunc().

◆ getBackendLayoutForPage()

BackendLayout TYPO3\CMS\Backend\View\BackendLayoutView::getBackendLayoutForPage ( int  $pageId)

◆ getColPosListItemsParsed()

array TYPO3\CMS\Backend\View\BackendLayoutView::getColPosListItemsParsed (   $id)

Gets the list of available columns for a given page id

Parameters
int$id
Returns
‪array $tcaItems

Definition at line 246 of file BackendLayoutView.php.

References $GLOBALS, TYPO3\CMS\Backend\View\BackendLayoutView\addColPosListLayoutItems(), TYPO3\CMS\Backend\View\BackendLayoutView\addItems(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ getColumnName()

string TYPO3\CMS\Backend\View\BackendLayoutView::getColumnName (   $column)
protected

Get column name from colPos item structure

Parameters
array$column
Returns
‪string

Definition at line 462 of file BackendLayoutView.php.

References TYPO3\CMS\Backend\View\BackendLayoutView\getLanguageService().

Referenced by TYPO3\CMS\Backend\View\BackendLayoutView\parseStructure().

◆ getDefaultColumnLayout()

static string TYPO3\CMS\Backend\View\BackendLayoutView::getDefaultColumnLayout ( )
static

Get default columns layout

Returns
‪string Default four column layout

Definition at line 384 of file BackendLayoutView.php.

Referenced by TYPO3\CMS\Backend\View\BackendLayout\DefaultDataProvider\createDefaultBackendLayout().

◆ getIdentifiersToBeExcluded()

array TYPO3\CMS\Backend\View\BackendLayoutView::getIdentifiersToBeExcluded ( array  $pageTSconfig)
protected

◆ getLanguageService()

TYPO3\CMS\Backend\View\BackendLayoutView::getLanguageService ( )
protected

◆ getPage()

array false null TYPO3\CMS\Backend\View\BackendLayoutView::getPage (   $pageId)
protected

Gets a page record.

Parameters
int$pageId
Returns
‪array|false|null

Definition at line 410 of file BackendLayoutView.php.

References TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Backend\View\BackendLayoutView\getSelectedCombinedIdentifier().

◆ getRootLine()

array TYPO3\CMS\Backend\View\BackendLayoutView::getRootLine (   $pageId)
protected

Gets the page root-line.

Parameters
int$pageId
Returns
‪array

Definition at line 438 of file BackendLayoutView.php.

Referenced by TYPO3\CMS\Backend\View\BackendLayoutView\getSelectedCombinedIdentifier().

◆ getSelectedBackendLayout()

array null TYPO3\CMS\Backend\View\BackendLayoutView::getSelectedBackendLayout (   $pageId)

Gets the selected backend layout structure as an array

Parameters
int$pageId
Returns
‪array|null $backendLayout

Definition at line 306 of file BackendLayoutView.php.

References TYPO3\CMS\Backend\View\BackendLayoutView\getBackendLayoutForPage().

Referenced by TYPO3\CMS\Backend\View\BackendLayoutView\addColPosListLayoutItems().

◆ getSelectedCombinedIdentifier()

bool string TYPO3\CMS\Backend\View\BackendLayoutView::getSelectedCombinedIdentifier (   $pageId)

Returns the backend layout which should be used for this page.

Parameters
int$pageId
Returns
‪bool|string Identifier of the backend layout to be used, or FALSE if none

Definition at line 156 of file BackendLayoutView.php.

References TYPO3\CMS\Backend\View\BackendLayoutView\getPage(), and TYPO3\CMS\Backend\View\BackendLayoutView\getRootLine().

Referenced by TYPO3\CMS\Backend\View\BackendLayoutView\getBackendLayoutForPage().

◆ parseStructure()

TYPO3\CMS\Backend\View\BackendLayoutView::parseStructure ( BackendLayout  $backendLayout)

Member Data Documentation

◆ $selectedBackendLayout

array TYPO3\CMS\Backend\View\BackendLayoutView::$selectedBackendLayout = []
protected

Definition at line 40 of file BackendLayoutView.php.

◆ $selectedCombinedIdentifier

array TYPO3\CMS\Backend\View\BackendLayoutView::$selectedCombinedIdentifier = []
protected