CollectionService
class \
- Implements
- SingletonInterface
Service to collect dependent elements.
Internal
Table of Contents
Interfaces
- SingletonInterface
- "empty" interface for singletons (marker interface pattern)
Properties
- $dataArray : array
- $dependencyResolver : DependencyResolver|null
- $eventDispatcher : EventDispatcherInterface
- $nestedDataArray : array
- $visitedContexts : array<string, true>
- Contexts elements have already been resolved in, see resolveDataArrayChildDependencies() for details.
Methods
- __construct() : mixed
- getDependencyResolver() : DependencyResolver
- process() : array
- Processes the data array
- finalize() : array
- Applies structures to instance data array and ensures children are added below accordant parent
- getBackendUser() : BackendUserAuthentication
- getCollectionChildrenCount() : int
- Return count of children, present in the data array
- resolveDataArrayChildDependencies() : void
- Resolves nested child dependencies.
Properties
$dataArray
protected
array
$dataArray
$dependencyResolver
protected
DependencyResolver|null
$dependencyResolver
= null
$eventDispatcher read-only
protected
EventDispatcherInterface
$eventDispatcher
$nestedDataArray
protected
array
$nestedDataArray
$visitedContexts
Contexts elements have already been resolved in, see resolveDataArrayChildDependencies() for details.
protected
array<string, true>
$visitedContexts
Methods
__construct()
public
__construct(EventDispatcherInterface $eventDispatcher) : mixed
Parameters
- $eventDispatcher : EventDispatcherInterface
getDependencyResolver()
public
getDependencyResolver() : DependencyResolver
Return values
DependencyResolverprocess()
Processes the data array
public
process(array $dataArray) : array
Parameters
- $dataArray : array
Return values
arrayfinalize()
Applies structures to instance data array and ensures children are added below accordant parent
protected
finalize(array $dataArray) : array
Parameters
- $dataArray : array
Return values
arraygetBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetCollectionChildrenCount()
Return count of children, present in the data array
protected
getCollectionChildrenCount(ReferenceEntity[] $children, array<string, true> $entryPath) : int
Parameters
- $children : ReferenceEntity[]
- $entryPath : array<string, true>
-
Elements of the branch that is currently traversed
Return values
intresolveDataArrayChildDependencies()
Resolves nested child dependencies.
protected
resolveDataArrayChildDependencies(ElementEntity $parent, int $collection[, string $nextParentIdentifier = '' ][, int $collectionLevel = 0 ][, array<string, true> $entryPath = [] ]) : void
Parameters
- $parent : ElementEntity
- $collection : int
- $nextParentIdentifier : string = ''
- $collectionLevel : int = 0
- $entryPath : array<string, true> = []
-
Elements of the branch that is currently traversed