GridDataService implements LoggerAwareInterface uses LoggerAwareTrait
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Interfaces
- LoggerAwareInterface
Properties
Methods
- __construct() : mixed
- generateGridListFromVersions() : array<string|int, mixed>
- Generates grid list array from given versions.
- addCollectionChildrenRecursive() : void
- Add collection children to the data array part recursively
- calculateStartWithCollections() : int
- Calculate the "real" start value by also taking collection children into account
- generateDataArray() : array<string|int, mixed>
- Generates grid list array from given versions.
- getBackendUser() : BackendUserAuthentication
- getDataArray() : array<string|int, mixed>
- Gets the data array by considering the page to be shown in the grid view.
- getDependencyCollectionService() : CollectionService
- getIntegrityService() : IntegrityService
- Gets an instance of the integrity service.
- getLanguageValue() : int
- Gets the language value (system language uid) of a given database record
- getSystemLanguageValue() : string|null
- Gets a named value of an available system language
- getTcaEnableColumnsFieldName() : string|null
- Gets the field name of the enable-columns as defined in $TCA.
- isPageModuleAllowed() : bool
- Checks whether the configured page module can be accessed by the current user.
- resolveDataArrayDependencies() : array<string|int, mixed>
- Resolves dependencies of nested structures and sort data elements considering these dependencies.
- versionIsModified() : bool
- workspaceState() : string
- Gets the state of a given state value.
Properties
$integrityService
protected
IntegrityService|null
$integrityService
Methods
__construct()
public
__construct(EventDispatcherInterface $eventDispatcher, ModuleProvider $moduleProvider, WorkspacePublishGate $workspacePublishGate, UriBuilder $uriBuilder, IconFactory $iconFactory, TranslationConfigurationProvider $translationConfigurationProvider, StagesService $stagesService) : mixed
Parameters
- $eventDispatcher : EventDispatcherInterface
- $moduleProvider : ModuleProvider
- $workspacePublishGate : WorkspacePublishGate
- $uriBuilder : UriBuilder
- $iconFactory : IconFactory
- $translationConfigurationProvider : TranslationConfigurationProvider
- $stagesService : StagesService
generateGridListFromVersions()
Generates grid list array from given versions.
public
generateGridListFromVersions(array<string|int, WorkspaceStage> $stages, array<string|int, mixed> $versions, stdClass $parameter) : array<string|int, mixed>
Parameters
- $stages : array<string|int, WorkspaceStage>
- $versions : array<string|int, mixed>
-
All records uids etc. First key is table name, second key incremental integer. Records are associative arrays with uid and t3ver_oid fields. The pid of the online record is found as "livepid" the pid of the offline record is found in "wspid"
- $parameter : stdClass
-
Parameters as submitted by JavaScript component
Return values
array<string|int, mixed> —Version record information (filtered, sorted and limited)
addCollectionChildrenRecursive()
Add collection children to the data array part recursively
protected
addCollectionChildrenRecursive(array<string|int, mixed> $dataArray, array<string|int, mixed> $item, int &$recordsCount[, array<string|int, mixed> &$dataArrayPart = [] ]) : void
Parameters
- $dataArray : array<string|int, mixed>
- $item : array<string|int, mixed>
- $recordsCount : int
- $dataArrayPart : array<string|int, mixed> = []
calculateStartWithCollections()
Calculate the "real" start value by also taking collection children into account
protected
calculateStartWithCollections(array<string|int, mixed> $dataArray, int $start) : int
Parameters
- $dataArray : array<string|int, mixed>
- $start : int
Return values
intgenerateDataArray()
Generates grid list array from given versions.
protected
generateDataArray(array<string|int, WorkspaceStage> $stages, array<string|int, mixed> $versions, string $filterTxt) : array<string|int, mixed>
Parameters
- $stages : array<string|int, WorkspaceStage>
- $versions : array<string|int, mixed>
-
All available version records
- $filterTxt : string
-
Text to be used to filter record result
Return values
array<string|int, mixed>getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetDataArray()
Gets the data array by considering the page to be shown in the grid view.
protected
getDataArray(array<string|int, mixed> $dataArray, int $start, int $limit) : array<string|int, mixed>
Parameters
- $dataArray : array<string|int, mixed>
- $start : int
- $limit : int
Return values
array<string|int, mixed>getDependencyCollectionService()
protected
getDependencyCollectionService() : CollectionService
Return values
CollectionServicegetIntegrityService()
Gets an instance of the integrity service.
protected
getIntegrityService() : IntegrityService
Return values
IntegrityServicegetLanguageValue()
Gets the language value (system language uid) of a given database record
protected
getLanguageValue(string $table, array<string|int, mixed> $record) : int
Parameters
- $table : string
-
Name of the table
- $record : array<string|int, mixed>
-
Database record
Return values
intgetSystemLanguageValue()
Gets a named value of an available system language
protected
getSystemLanguageValue(int $id, int $pageId, string $key) : string|null
Parameters
- $id : int
-
system language uid
- $pageId : int
-
page id of a site
- $key : string
-
Name of the value to be fetched (e.g. title)
Return values
string|nullgetTcaEnableColumnsFieldName()
Gets the field name of the enable-columns as defined in $TCA.
protected
getTcaEnableColumnsFieldName(string $table, string $type) : string|null
Parameters
- $table : string
-
Name of the table
- $type : string
-
Type to be fetches (e.g. 'disabled', 'starttime', 'endtime', 'fe_group)
Return values
string|null —The accordant field name or NULL if not defined
isPageModuleAllowed()
Checks whether the configured page module can be accessed by the current user.
protected
isPageModuleAllowed() : bool
Note that this does not check whether a custom page module is configured correctly.
Return values
boolresolveDataArrayDependencies()
Resolves dependencies of nested structures and sort data elements considering these dependencies.
protected
resolveDataArrayDependencies(array<string|int, mixed> $dataArray) : array<string|int, mixed>
Parameters
- $dataArray : array<string|int, mixed>
Return values
array<string|int, mixed>versionIsModified()
protected
versionIsModified(array<string|int, WorkspaceStage> $stages, CombinedRecord $combinedRecord) : bool
Parameters
- $stages : array<string|int, WorkspaceStage>
- $combinedRecord : CombinedRecord
Return values
boolworkspaceState()
Gets the state of a given state value.
protected
workspaceState(int $stateId[, bool $hiddenOnline = false ][, bool $hiddenOffline = false ][, bool $hasDiff = true ]) : string
Parameters
- $stateId : int
-
stateId of offline record
- $hiddenOnline : bool = false
-
hidden status of online record
- $hiddenOffline : bool = false
-
hidden status of offline record
- $hasDiff : bool = true
-
whether the version has any changes