2 namespace TYPO3\CMS\Workspaces\Service\Dependency;
19 use TYPO3\CMS\Version\Dependency;
56 if (!isset($this->dependencyResolver)) {
58 $this->dependencyResolver->setOuterMostParentsRequireReferences(
true);
59 $this->dependencyResolver->setWorkspace($this->
getWorkspace());
61 $this->dependencyResolver->setEventCallback(
66 $this->dependencyResolver->setEventCallback(
71 $this->dependencyResolver->setEventCallback(
90 \TYPO3\CMS\Version\Dependency\EventCallback::class,
102 if (!isset($this->elementEntityProcessor)) {
104 $this->elementEntityProcessor->setWorkspace($this->
getWorkspace());
116 return (
int)
$GLOBALS[
'BE_USER']->workspace;
129 $this->nestedDataArray = array();
133 if (empty($outerMostParents)) {
138 foreach ($outerMostParents as $outerMostParent) {
145 $processedDataArray = $this->
finalize($this->dataArray);
147 unset($this->dataArray);
148 unset($this->nestedDataArray);
150 return $processedDataArray;
162 $processedDataArray = array();
163 foreach ($dataArray as $dataElement) {
164 $dataElementIdentifier = $dataElement[
'id'];
165 $processedDataArray[] = $dataElement;
167 if (!empty($this->nestedDataArray[$dataElementIdentifier])) {
168 $processedDataArray = array_merge(
170 $this->
finalize($this->nestedDataArray[$dataElementIdentifier])
172 unset($this->nestedDataArray[$dataElementIdentifier]);
176 return $processedDataArray;
189 $parentIdentifier = $parent->__toString();
190 $parentIsSet = isset($this->dataArray[$parentIdentifier]);
197 $nextParentIdentifier = $parentIdentifier;
201 foreach ($parent->getChildren() as $child) {
203 $child->getElement(),
205 $nextParentIdentifier,
209 $childIdentifier = $child->getElement()->__toString();
210 if (!empty($nextParentIdentifier) && isset($this->dataArray[$childIdentifier])) {
214 $this->nestedDataArray[$nextParentIdentifier][] = $this->dataArray[$childIdentifier];
215 unset($this->dataArray[$childIdentifier]);