PageDoktypeRegistry

class \TYPO3\CMS\Core\DataHandling\PageDoktypeRegistry

This object defines the various types of pages (field: doktype) the system can handle and what restrictions may apply to them when adding records.

Here you can define which tables are allowed on a certain pagetype (doktype).

NOTE: The 'default' entry array is the 'base' for all types, and for every type the entries simply overrides the entries in the 'default' type!

You can fully use this once TCA is properly loaded (e.g. in ext_tables.php).

Attributes

#[Autoconfigure]
$public: true

Table of Contents

Properties

$pageTypes  : array
$tcaSchemaFactory  : TcaSchemaFactory

Methods

__construct()  : mixed
add()  : void
Adds a specific configuration for a doktype. By default, it is NOT restricted to only allow tables that have been explicitly added via addAllowedRecordTypes().
addAllowedRecordTypes()  : void
doesDoktypeOnlyAllowSpecifiedRecordTypes()  : bool
exportConfiguration()  : array
getAllDoktypes()  : SelectItem[]
getAllowedTypesForDoktype()  : array
getNonViewableDoktypes()  : int[]
Returns array of non-viewable doktype integers based on TCA only.
isPageTypeViewable()  : bool
Check if a page type is viewable based on TCA configuration only.
isPageViewable()  : bool
Check if a page is viewable, considering both TCA and pageTsConfig.
isRecordTypeAllowedForDoktype()  : bool
Check if a record can be added on a page with a given $doktype.

Properties

$pageTypes

Deprecated

will be removed in TYPO3 v15.0

protected array $pageTypes = []

Methods

add()

Adds a specific configuration for a doktype. By default, it is NOT restricted to only allow tables that have been explicitly added via addAllowedRecordTypes().

public add(int $dokType, array $configuration) : void

Deprecated

Use TCA option "allowedRecordTypes" instead.

Parameters

$dokType : int
$configuration : array

addAllowedRecordTypes()

public addAllowedRecordTypes(array $recordTypes[, int|null $doktype = null ]) : void

Deprecated

Override TCA option "allowedRecordTypes" instead.

Parameters

$recordTypes : array
$doktype : int|null = null

doesDoktypeOnlyAllowSpecifiedRecordTypes()

public doesDoktypeOnlyAllowSpecifiedRecordTypes([int|null $doktype = null ]) : bool

Deprecated

Is now always true.

Parameters

$doktype : int|null = null

Return values

bool

exportConfiguration()

public exportConfiguration() : array

Return values

array

getAllowedTypesForDoktype()

public getAllowedTypesForDoktype(int $doktype) : array

Parameters

$doktype : int

Return values

array

getNonViewableDoktypes()

Returns array of non-viewable doktype integers based on TCA only.

public getNonViewableDoktypes() : int[]

Used for JavaScript tree configuration.

Return values

int[]

isPageTypeViewable()

Check if a page type is viewable based on TCA configuration only.

public isPageTypeViewable(int $doktype) : bool

Does NOT consider pageTsConfig overrides.

By default, all page types are viewable unless explicitly set to false via the TCA option "isViewable".

Parameters

$doktype : int

Return values

bool

isPageViewable()

Check if a page is viewable, considering both TCA and pageTsConfig.

public isPageViewable(int $doktype, int $pageId) : bool

Respects TCEMAIN.preview.disableButtonForDokType TSconfig.

Parameters

$doktype : int
$pageId : int

Return values

bool

isRecordTypeAllowedForDoktype()

Check if a record can be added on a page with a given $doktype.

public isRecordTypeAllowedForDoktype(string $type, int $doktype) : bool

Parameters

$type : string
$doktype : int

Return values

bool
On this page