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<string|int, mixed>
$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<string|int, mixed>
getAllDoktypes()  : array<string|int, SelectItem>
getAllowedTypesForDoktype()  : array<string|int, mixed>
getNonViewableDoktypes()  : array<string|int, 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<string|int, mixed> $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<string|int, mixed> $configuration) : void
Deprecated

Use TCA option "allowedRecordTypes" instead.

Parameters
$dokType : int
$configuration : array<string|int, mixed>

addAllowedRecordTypes()

public addAllowedRecordTypes(array<string|int, mixed> $recordTypes[, int|null $doktype = null ]) : void
Deprecated

Override TCA option "allowedRecordTypes" instead.

Parameters
$recordTypes : array<string|int, mixed>
$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<string|int, mixed>
Internal

only to be used within TYPO3 Core

Return values
array<string|int, mixed>

getAllowedTypesForDoktype()

public getAllowedTypesForDoktype(int $doktype) : array<string|int, mixed>
Parameters
$doktype : int
Internal

only to be used within TYPO3 Core

Return values
array<string|int, mixed>

getNonViewableDoktypes()

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

public getNonViewableDoktypes() : array<string|int, int>

Used for JavaScript tree configuration.

Return values
array<string|int, 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

Search results