DefaultDataProvider implements DataProviderInterface
Backend layout data provider class
Specific DataProviderInterface implementation, not considered public API.
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Interfaces
- DataProviderInterface
- Interface for classes which hook into BackendLayoutDataProvider to provide additional backend layouts from various sources.
Methods
- __construct() : mixed
- addBackendLayouts() : void
- Adds backend layouts to the given backend layout collection.
- getBackendLayout() : BackendLayout|null
- Gets a backend layout by (regular) identifier.
- createBackendLayout() : BackendLayout
- Creates a new backend layout using the given record data.
- createDefaultBackendLayout() : BackendLayout
- Creates a backend layout with the default configuration.
- getIconPath() : string
- Resolves the icon from the database record
- getLayoutData() : array<string|int, mixed>
- Get all layouts from the core's default data provider.
- getPageTSconfigIds() : array<string|int, mixed>
- Returns the page TSconfig from TCEFORM.
- getStoragePid() : int
- Returns the storage PID from TCEFORM.
Methods
__construct()
public
__construct(FileRepository $fileRepository, ConnectionPool $connectionPool, TcaSchemaFactory $tcsSchemaFactory, Context $context) : mixed
Parameters
- $fileRepository : FileRepository
- $connectionPool : ConnectionPool
- $tcsSchemaFactory : TcaSchemaFactory
- $context : Context
addBackendLayouts()
Adds backend layouts to the given backend layout collection.
public
addBackendLayouts(DataProviderContext $dataProviderContext, BackendLayoutCollection $backendLayoutCollection) : void
The default backend layout ('default_default') is not added since it's the default fallback if nothing is specified.
Parameters
- $dataProviderContext : DataProviderContext
- $backendLayoutCollection : BackendLayoutCollection
getBackendLayout()
Gets a backend layout by (regular) identifier.
public
getBackendLayout(string|int $identifier, int $pageId) : BackendLayout|null
Parameters
- $identifier : string|int
- $pageId : int
Return values
BackendLayout|nullcreateBackendLayout()
Creates a new backend layout using the given record data.
protected
createBackendLayout(array<string|int, mixed> $data) : BackendLayout
Parameters
- $data : array<string|int, mixed>
Return values
BackendLayoutcreateDefaultBackendLayout()
Creates a backend layout with the default configuration.
protected
createDefaultBackendLayout() : BackendLayout
Return values
BackendLayoutgetIconPath()
Resolves the icon from the database record
protected
getIconPath(array<string|int, mixed> $icon) : string
Parameters
- $icon : array<string|int, mixed>
Return values
stringgetLayoutData()
Get all layouts from the core's default data provider.
protected
getLayoutData(string $fieldName, array<string|int, mixed> $pageTsConfig, int $pageUid) : array<string|int, mixed>
Parameters
- $fieldName : string
-
the name of the field the layouts are provided for (either backend_layout or backend_layout_next_level)
- $pageTsConfig : array<string|int, mixed>
-
PageTSconfig of the given page
- $pageUid : int
-
the ID of the page wea re getting the layouts for
Return values
array<string|int, mixed> —$layouts A collection of layout data of the registered provider
getPageTSconfigIds()
Returns the page TSconfig from TCEFORM.
protected
getPageTSconfigIds(array<string|int, mixed> $pageTsConfig) : array<string|int, mixed>
Parameters
- $pageTsConfig : array<string|int, mixed>
Return values
array<string|int, mixed>getStoragePid()
Returns the storage PID from TCEFORM.
protected
getStoragePid(array<string|int, mixed> $pageTsConfig) : int
Parameters
- $pageTsConfig : array<string|int, mixed>