File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -319,18 +319,21 @@ public function getIdentities(): array
319319 {
320320 $ identities = [];
321321
322- $ entity = $ this ->getLayer ()->getCurrentAttributeSet ();
323- if ($ entity ) {
324- $ identities [] = CustomEntity::CACHE_CUSTOM_ENTITY_SET_TAG . '_ ' . $ entity ->getAttributeSetId ();
322+ $ attributeSet = $ this ->getLayer ()->getCurrentAttributeSet ();
323+ if ($ attributeSet ) {
324+ $ identities [] = CustomEntity::CACHE_CUSTOM_ENTITY_SET_TAG . '_ ' . $ attributeSet ->getAttributeSetId ();
325325 }
326326
327327 foreach ($ this ->_getEntityCollection () as $ entity ) {
328- $ identities [] = $ item ->getIdentities ();
328+ $ entityIdentities = $ entity ->getIdentities ();
329+ if ($ entityIdentities ) {
330+ foreach ($ entityIdentities as $ identity ) {
331+ $ identities [] = $ identity ;
332+ }
333+ }
329334 }
330335
331- $ identities = array_merge ([], ...$ identities );
332-
333- return $ identities ;
336+ return array_unique ($ identities );
334337 }
335338
336339 /**
@@ -397,4 +400,4 @@ private function configureToolbar(Toolbar $toolbar, Collection $collection)
397400 $ toolbar ->setCollection ($ collection );
398401 $ this ->setChild ('toolbar ' , $ toolbar );
399402 }
400- }
403+ }
You can’t perform that action at this time.
0 commit comments