22 foreach ($popupDataItems as $popupDataItem)
24 $this->
add($popupDataItem);
30 public function merge(
self $popupData): self
32 foreach ($popupData->popupItems as $popupItem)
34 $this->mergeItem($popupItem);
42 $this->mergeItem($item);
60 $this->maxLevel =
$options[
'POPUP_MAX_LEVEL'] ?? static::DEFAULT_MAX_LEVEL;
63 foreach ($this->popupItems as $item)
73 if ($level > $this->maxLevel)
81 foreach ($this->popupItems as $item)
85 $innerPopupData->merge($item->getPopupData($this->excludedList));
89 $innerPopupData->fillNextLevel($level + 1);
90 $this->
merge($innerPopupData);
95 if (!isset($this->popupItems[$popupItem::getRestEntityName()]))
97 $this->popupItems[$popupItem::getRestEntityName()] = $popupItem;
98 $this->filterItems($this->excludedList);
102 $this->popupItems[$popupItem::getRestEntityName()]->merge($popupItem);
114 unset($this->popupItems[$excludedItem::getRestEntityName()]);