GridDataService

class \TYPO3\CMS\Workspaces\Service\GridDataService

Implements
LoggerAwareInterface
Uses
LoggerAwareTrait

Attributes

#[Autoconfigure]
$public: true

Table of Contents

Interfaces

LoggerAwareInterface

Properties

$integrityService  : IntegrityService|null

Methods

__construct()  : mixed
generateGridListFromVersions()  : array
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
Generates grid list array from given versions.
getBackendUser()  : BackendUserAuthentication
getDataArray()  : array
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
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

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(WorkspaceStage[] $stages, array $versions, stdClass $parameter) : array

Parameters

$stages : WorkspaceStage[]
$versions : array

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 —

Version record information (filtered, sorted and limited)

addCollectionChildrenRecursive()

Add collection children to the data array part recursively

protected addCollectionChildrenRecursive(array $dataArray, array $item, int &$recordsCount[, array &$dataArrayPart = [] ]) : void

Parameters

$dataArray : array
$item : array
$recordsCount : int
$dataArrayPart : array = []

calculateStartWithCollections()

Calculate the "real" start value by also taking collection children into account

protected calculateStartWithCollections(array $dataArray, int $start) : int

Parameters

$dataArray : array
$start : int

Return values

int

getDataArray()

Gets the data array by considering the page to be shown in the grid view.

protected getDataArray(array $dataArray, int $start, int $limit) : array

Parameters

$dataArray : array
$start : int
$limit : int

Return values

array

getLanguageValue()

Gets the language value (system language uid) of a given database record

protected getLanguageValue(string $table, array $record) : int

Parameters

$table : string

Name of the table

$record : array

Database record

Return values

int

getSystemLanguageValue()

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|null

getTcaEnableColumnsFieldName()

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

bool

resolveDataArrayDependencies()

Resolves dependencies of nested structures and sort data elements considering these dependencies.

protected resolveDataArrayDependencies(array $dataArray) : array

Parameters

$dataArray : array

Return values

array

workspaceState()

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

Return values

string
On this page