PageDoktypeRegistry implements SingletonInterface

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).

Table of Contents

Interfaces

SingletonInterface
"empty" interface for singletons (marker interface pattern)

Properties

$pageTypes  : array<string|int, mixed>

Methods

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
Used to find out if a specific doktype is restricted to only allow a certain list of tables.
exportConfiguration()  : array<string|int, mixed>
getAllowedTypesForDoktype()  : array<string|int, mixed>
getRegisteredDoktypes()  : array<string|int, mixed>
isRecordTypeAllowedForDoktype()  : bool
Check if a record can be added on a page with a given $doktype.

Properties

$pageTypes

protected array<string|int, mixed> $pageTypes = [ \TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_BE_USER_SECTION => ['allowedTables' => '*'], // Doktype 254 is a 'Folder' - a general purpose storage folder for whatever you like. // In CMS context it's NOT a viewable page. Can contain any element. \TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_SYSFOLDER => ['allowedTables' => '*'], // Doktype 255 is a recycle-bin. \TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_RECYCLER => ['allowedTables' => '*'], \TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_MOUNTPOINT => [], // Even though both options look contradictory, the "allowedTables" key is used for other $pageTypes // that have no custom definitions. So "allowedTables" works as a fallback for additional page types // Effectively working like "allowTableOnStandardPages()" as the default entry is a "standard page" 'default' => ['allowedTables' => 'pages,sys_category,sys_file_reference,sys_file_collection', 'onlyAllowedTables' => false], ]

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

addAllowedRecordTypes()

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

doesDoktypeOnlyAllowSpecifiedRecordTypes()

Used to find out if a specific doktype is restricted to only allow a certain list of tables.

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

This list can be checked against via 'isRecordTypeAllowedForDoktype()'

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>

getRegisteredDoktypes()

public getRegisteredDoktypes() : array<string|int, mixed>
Internal
Return values
array<string|int, mixed>

isRecordTypeAllowedForDoktype()

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

public isRecordTypeAllowedForDoktype(string $type, int|null $doktype) : bool
Parameters
$type : string
$doktype : int|null
Return values
bool

        
On this page

Search results