PageDoktypeRegistry
class \
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
= []
$tcaSchemaFactory read-only
protected
TcaSchemaFactory
$tcaSchemaFactory
Methods
__construct()
public
__construct(TcaSchemaFactory $tcaSchemaFactory) : mixed
Parameters
- $tcaSchemaFactory : TcaSchemaFactory
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
boolexportConfiguration()
public
exportConfiguration() : array
Internal
only to be used within TYPO3 Core
Return values
arraygetAllDoktypes()
public
getAllDoktypes() : SelectItem[]
Return values
SelectItem[]getAllowedTypesForDoktype()
public
getAllowedTypesForDoktype(int $doktype) : array
Parameters
- $doktype : int
Internal
only to be used within TYPO3 Core
Return values
arraygetNonViewableDoktypes()
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
boolisPageViewable()
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
boolisRecordTypeAllowedForDoktype()
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