private function loadChildAttributes(int $storeId)
    {
        if ($this->childEntities->count() === 0) {
            return;
        }

        $iterator = $this->eavIteratorFactory->create(['entityCode' => Product::ENTITY, 'attributes' => []]);
        $iterator->setEntityIds($this->childEntities->getIds());
        $iterator->setStoreId($storeId);
        $this->iteratorInitializer->initializeAttributes($iterator);

        foreach ($iterator as $childData) {
            $childId = (int) $childData['entity_id'];
            $childEntity = $this->childEntities->get($childId);
            $childEntity->setFromArray($childData);
        }
    }
private function loadChildAttributes(int $storeId)
    {
        if ($this->childEntities->count() === 0) {
            return;
        }

        $iterator = $this->eavIteratorFactory->create(['entityCode' => Product::ENTITY, 'attributes' => []]);
        $iterator->setEntityIds($this->childEntities->getIds());
        $iterator->setStoreId($storeId);
        $this->iteratorInitializer->initializeAttributes($iterator);

        foreach ($iterator as $childData) {
            $childId = (int) $childData['entity_id'];
            $childEntity = $this->childEntities->get($childId);
            $childEntity->setFromArray($childData);
        }
    }
private function loadChildAttributes ( int $ storeId ) { if ( $ this -> childEntities -> count ( ) === 0 ) { return ; } $ iterator = $ this -> eavIteratorFactory -> create ( [ 'entityCode' => Product :: ENTITY , 'attributes' => [ ] ] ) ; $ iterator -> setEntityIds ( $ this -> childEntities -> getIds ( ) ) ; $ iterator -> setStoreId ( $ storeId ) ; $ this -> iteratorInitializer -> initializeAttributes ( $ iterator ) ; foreach ( $ iterator as $ childData ) { $ childId = ( int ) $ childData [ 'entity_id' ] ; $ childEntity = $ this -> childEntities -> get ( $ childId ) ; $ childEntity -> setFromArray ( $ childData ) ; } }
Load child attribute data
Load child attribute data