use Shopware\Core\Framework\DataAbstractionLayer\EntityCollection;
use Shopware\Core\Framework\Log\Package;
/**
* @extends EntityCollection<CmsBlockEntity>
*/
#[Package('buyers-experience')]
class CmsBlockCollection extends EntityCollection
{ public function getSlots(): CmsSlotCollection
{ $slots =
new CmsSlotCollection();
foreach ($this->
getIterator() as $block) { if (!
$block->
getSlots()) { continue;
} $slots->
merge($block->
getSlots());
} return $slots;
}