File tree 1 file changed +11
-8
lines changed
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
319
319
{
320
320
$ identities = [];
321
321
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 ();
325
325
}
326
326
327
327
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
+ }
329
334
}
330
335
331
- $ identities = array_merge ([], ...$ identities );
332
-
333
- return $ identities ;
336
+ return array_unique ($ identities );
334
337
}
335
338
336
339
/**
@@ -397,4 +400,4 @@ private function configureToolbar(Toolbar $toolbar, Collection $collection)
397
400
$ toolbar ->setCollection ($ collection );
398
401
$ this ->setChild ('toolbar ' , $ toolbar );
399
402
}
400
- }
403
+ }
You can’t perform that action at this time.
0 commit comments