CollectionService implements SingletonInterface
Service to collect dependent elements.
Table of Contents
Interfaces
- SingletonInterface
- "empty" interface for singletons (marker interface pattern)
Properties
- $dataArray : array<string|int, mixed>
- $dataHandler : DataHandler
- $dependencyResolver : DependencyResolver|null
- $elementEntityProcessor : ElementEntityProcessor|null
- $nestedDataArray : array<string|int, mixed>
Methods
- getDependencyResolver() : DependencyResolver
- process() : array<string|int, mixed>
- Processes the data array
- finalize() : array<string|int, mixed>
- Applies structures to instance data array and ensures children are added below accordant parent
- getCollectionChildrenCount() : int
- Return count of children, present in the data array
- getDependencyCallback() : EventCallback
- Gets a new callback to be used in the dependency resolver utility.
- getElementEntityProcessor() : ElementEntityProcessor
- Gets the element entity processor.
- getWorkspace() : int
- Gets the current workspace id.
- resolveDataArrayChildDependencies() : mixed
- Resolves nested child dependencies.
Properties
$dataArray
protected
array<string|int, mixed>
$dataArray
$dataHandler
protected
DataHandler
$dataHandler
$dependencyResolver
protected
DependencyResolver|null
$dependencyResolver
$elementEntityProcessor
protected
ElementEntityProcessor|null
$elementEntityProcessor
$nestedDataArray
protected
array<string|int, mixed>
$nestedDataArray
Methods
getDependencyResolver()
public
getDependencyResolver() : DependencyResolver
Return values
DependencyResolverprocess()
Processes the data array
public
process(array<string|int, mixed> $dataArray) : array<string|int, mixed>
Parameters
- $dataArray : array<string|int, mixed>
Return values
array<string|int, mixed>finalize()
Applies structures to instance data array and ensures children are added below accordant parent
protected
finalize(array<string|int, mixed> $dataArray) : array<string|int, mixed>
Parameters
- $dataArray : array<string|int, mixed>
Return values
array<string|int, mixed>getCollectionChildrenCount()
Return count of children, present in the data array
protected
getCollectionChildrenCount(array<string|int, ReferenceEntity> $children) : int
Parameters
- $children : array<string|int, ReferenceEntity>
Return values
intgetDependencyCallback()
Gets a new callback to be used in the dependency resolver utility.
protected
getDependencyCallback(string $method[, array<string|int, mixed> $targetArguments = [] ]) : EventCallback
Parameters
- $method : string
- $targetArguments : array<string|int, mixed> = []
Return values
EventCallbackgetElementEntityProcessor()
Gets the element entity processor.
protected
getElementEntityProcessor() : ElementEntityProcessor
Return values
ElementEntityProcessorgetWorkspace()
Gets the current workspace id.
protected
getWorkspace() : int
Return values
intresolveDataArrayChildDependencies()
Resolves nested child dependencies.
protected
resolveDataArrayChildDependencies(ElementEntity $parent, int $collection[, string $nextParentIdentifier = '' ][, int $collectionLevel = 0 ]) : mixed
Parameters
- $parent : ElementEntity
- $collection : int
- $nextParentIdentifier : string = ''
- $collectionLevel : int = 0