[BaseCollection] Prepare elements while adding them by addMultiple() method in the same way as passing them in constructor

This commit is contained in:
Meritoo
2021-04-27 22:13:11 +02:00
parent a459bfe1ce
commit fcaae95810
3 changed files with 9 additions and 2 deletions

View File

@@ -84,7 +84,9 @@ abstract class BaseCollection implements CollectionInterface
return;
}
foreach ($elements as $index => $element) {
$prepared = $this->prepareElements($elements);
foreach ($prepared as $index => $element) {
if ($useIndexes) {
$this->add($element, $index);