PageLayoutView implements LoggerAwareInterface uses LoggerAwareTrait

Child class for the Web > Page module

Deprecated

Will be removed in TYPO3 11

Internal

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

Table of Contents

Interfaces

LoggerAwareInterface

Properties

$CType_labels  : array<string|int, mixed>
Used to store labels for CTypes for tt_content elements
$defLangBinding  : bool
If set TRUE, the language mode of tt_content elements will be rendered with hard binding between default language content elements and their translations!
$doEdit  : bool
If TRUE, elements will have edit icons (probably this is whether the user has permission to edit the page content). Set externally.
$id  : int
Page id
$itemLabels  : array<string|int, mixed>
Used to store labels for the various fields in tt_content elements
$option_newWizard  : bool
If TRUE, new-wizards are linked to rather than the regular new-element list.
$pageRecord  : array<string|int, string>
Loaded with page record with version overlay if any.
$tt_contentConfig  : array<string|int, mixed>
External, static: Configuration of tt_content element display:
$tt_contentData  : array<string|int, mixed>
Used to move content up / down
$contentElementCache  : array<string|int, mixed>
Caches the amount of content elements as a matrix
$iconFactory  : IconFactory
$languageHasTranslationsCache  : array<string|int, mixed>
Stores whether a certain language has translations in it
$localizationController  : LocalizationController
$pageinfo  : array<string|int, mixed>
Current ids page record
$referenceCount  : array<string|int, mixed>
Cache the number of references to a record
$siteLanguages  : array<string|int, SiteLanguage>
Contains site languages for this page ID
$uriBuilder  : UriBuilder

Methods

__construct()  : mixed
createFromPageLayoutContext()  : PageLayoutView
getIcon()  : string
Creates the icon image tag for record from table and wraps it in a link which will trigger the click menu.
getNonTranslatedTTcontentUids()  : array<string|int, mixed>
Filters out all tt_content uids which are already translated so only non-translated uids is left.
getProcessedValue()  : mixed
Creates processed values for all field names in $fieldList based on values from $row array.
getQueryBuilder()  : QueryBuilder
Returns a QueryBuilder configured to select $fields from $table where the pid is restricted.
getResult()  : array<string|int, mixed>
Traverse the result pointer given, adding each record to array and setting some internal values at the same time.
getTable_tt_content()  : string
Renders Content Elements from the tt_content table from page id
getThumbCodeUnlinked()  : string
Create thumbnail code for record/field but not linked
isDisabled()  : bool
Returns TRUE, if the record given as parameters is NOT visible based on hidden/starttime/endtime (if available)
languageSelector()  : string
Make selector box for creating new translation in a language Displays only languages which are not yet present for the current page and that are not disabled with page TS.
linkEditContent()  : string
Will create a link on the input string and possibly a big button after the string which links to editing in the RTE.
newLanguageButton()  : string
Creates button which is used to create copies of records.
renderContentElementHeader()  : string
renderContentElementPreview()  : string
Renders the preview part of a content element
renderContentElementPreviewFromFluidTemplate()  : string|null
renderText()  : string
Processing of larger amounts of text (usually from RTE/bodytext fields) with word wrapping etc.
thumbCode()  : string
Create thumbnail code for record/field
tt_content_drawColHeader()  : string
Draw header for a content element column:
tt_content_drawHeader()  : string
Draw the header for a single tt_content element
tt_content_drawItem()  : string
Draws the preview content for a content element
checkIfTranslationsExistInLanguage()  : bool
Checks whether translated Content Elements exist in the desired language If so, deny creating new ones via the UI
generateLanguageView()  : string
Shows the content elements of the selected languages in each column.
generateTtContentDataArray()  : mixed
Generates the data for previous and next elements which is needed for movements.
getBackendLayoutView()  : BackendLayoutView
getBackendUser()  : BackendUserAuthentication
getContentRecordsPerColumn()  : array<string|int, mixed>
Gets content records per column.
getLanguageService()  : LanguageService
Returns the language service
getLocalizedPageTitle()  : string
getReferenceCount()  : int
Gets the number of records referencing the record with the UID $uid in the table $tableName.
getSelectedLanguages()  : array<string|int, int>
Build a list of language IDs that should be rendered in this view
hasContentModificationAndAccessPermissions()  : bool
Check if current user has modification and access permissions for content set
initialize()  : mixed
isContentEditable()  : bool
Check if content can be edited by current user
isDragAndDropAllowed()  : bool
Determine whether Drag & Drop should be allowed
isPageEditable()  : bool
Check if page can be edited by current user
prepareQueryBuilder()  : QueryBuilder
Return the modified QueryBuilder object ($queryBuilder) which will be used to select the records from a table $table with pid = $this->pidList
renderLanguageFlag()  : string
Renders the language flag and language title, but only if an icon is given, otherwise just the language
resolveSiteLanguages()  : mixed
Fetch the site language objects for the given $pageId and store it in $this->siteLanguages
tt_content_drawFooter()  : string
Draw the footer for a single tt_content element

Properties

$CType_labels

Used to store labels for CTypes for tt_content elements

public array<string|int, mixed> $CType_labels = []

$defLangBinding

If set TRUE, the language mode of tt_content elements will be rendered with hard binding between default language content elements and their translations!

public bool $defLangBinding = false

$doEdit

If TRUE, elements will have edit icons (probably this is whether the user has permission to edit the page content). Set externally.

public bool $doEdit = true

$itemLabels

Used to store labels for the various fields in tt_content elements

public array<string|int, mixed> $itemLabels = []

$option_newWizard

If TRUE, new-wizards are linked to rather than the regular new-element list.

public bool $option_newWizard = true

$pageRecord

Loaded with page record with version overlay if any.

public array<string|int, string> $pageRecord = []

$tt_contentConfig

External, static: Configuration of tt_content element display:

public array<string|int, mixed> $tt_contentConfig = [ 'languageCols' => 0, 'languageMode' => 0, 'languageColsPointer' => 0, // Displays hidden records as well 'showHidden' => 1, // Which language 'sys_language_uid' => 0, 'cols' => '1,0,2,3', // Which columns can be accessed by current BE user 'activeCols' => '1,0,2,3', ]

$tt_contentData

Used to move content up / down

public array<string|int, mixed> $tt_contentData = ['prev' => [], 'next' => []]

$contentElementCache

Caches the amount of content elements as a matrix

protected array<string|int, mixed> $contentElementCache = []
Internal

$languageHasTranslationsCache

Stores whether a certain language has translations in it

protected array<string|int, mixed> $languageHasTranslationsCache = []

$pageinfo

Current ids page record

protected array<string|int, mixed> $pageinfo

$referenceCount

Cache the number of references to a record

protected array<string|int, mixed> $referenceCount = []

$siteLanguages

Contains site languages for this page ID

protected array<string|int, SiteLanguage> $siteLanguages = []

Methods

getIcon()

Creates the icon image tag for record from table and wraps it in a link which will trigger the click menu.

public getIcon(string $table, array<string|int, mixed> $row) : string
Parameters
$table : string

Table name

$row : array<string|int, mixed>

Record array

Return values
string —

HTML for the icon

getNonTranslatedTTcontentUids()

Filters out all tt_content uids which are already translated so only non-translated uids is left.

public getNonTranslatedTTcontentUids(array<string|int, mixed> $defaultLanguageUids, int $id, int $lP) : array<string|int, mixed>

Selects across columns, but within in the same PID. Columns are expect to be the same for translations and original but this may be a conceptual error (?)

Parameters
$defaultLanguageUids : array<string|int, mixed>

Numeric array with uids of tt_content elements in the default language

$id : int

The page UID from which to fetch untranslated records (unused, remains in place for compatibility)

$lP : int

Sys language UID

Return values
array<string|int, mixed> —

Modified $defLanguageCount

getProcessedValue()

Creates processed values for all field names in $fieldList based on values from $row array.

public getProcessedValue(string $table, string $fieldList, array<string|int, mixed> $row, array<string|int, mixed> &$info) : mixed

The result is 'returned' through $info which is passed as a reference

Parameters
$table : string

Table name

$fieldList : string

Comma separated list of fields.

$row : array<string|int, mixed>

Record from which to take values for processing.

$info : array<string|int, mixed>

Array to which the processed values are added.

getQueryBuilder()

Returns a QueryBuilder configured to select $fields from $table where the pid is restricted.

public getQueryBuilder(string $table, int $pageId[, array<string|int, string> $additionalConstraints = [] ][, array<string|int, string> $fields = ['*'] ]) : QueryBuilder
Parameters
$table : string

Table name

$pageId : int

Page id Only used to build the search constraints, getPageIdConstraint() used for restrictions

$additionalConstraints : array<string|int, string> = []

Additional part for where clause

$fields : array<string|int, string> = ['*']

Field list to select, * for all

Return values
QueryBuilder

getResult()

Traverse the result pointer given, adding each record to array and setting some internal values at the same time.

public getResult(Result $result) : array<string|int, mixed>
Parameters
$result : Result

DBAL Result

Return values
array<string|int, mixed> —

The selected rows returned in this array.

getTable_tt_content()

Renders Content Elements from the tt_content table from page id

public getTable_tt_content(int $id) : string
Parameters
$id : int

Page id

Return values
string —

HTML for the listing

getThumbCodeUnlinked()

Create thumbnail code for record/field but not linked

public getThumbCodeUnlinked(array<string|int, mixed> $row, string $table, string $field) : string
Parameters
$row : array<string|int, mixed>

Record array

$table : string

Table (record is from)

$field : string

Field name for which thumbnail are to be rendered.

Return values
string —

HTML for thumbnails, if any.

isDisabled()

Returns TRUE, if the record given as parameters is NOT visible based on hidden/starttime/endtime (if available)

public isDisabled(string $table, array<string|int, mixed> $row) : bool
Parameters
$table : string

Tablename of table to test

$row : array<string|int, mixed>

Record row.

Return values
bool —

Returns TRUE, if disabled.

languageSelector()

Make selector box for creating new translation in a language Displays only languages which are not yet present for the current page and that are not disabled with page TS.

public languageSelector(int $id) : string
Parameters
$id : int

Page id for which to create a new translation record of pages

Tags
see
getTable_tt_content()
Return values
string —

HTML