private function addFilterByParent(ProductCollection $productCollection, $parentId)
    {
        $tableProductRelation = $productCollection->getTable('catalog_product_relation');
        $productCollection->getSelect()->join(
            ['pr' => $tableProductRelation],
            'e.entity_id = pr.child_id'
        )->where('pr.parent_id = ?', $parentId);
    }
private function addFilterByParent(ProductCollection $productCollection, $parentId)
    {
        $tableProductRelation = $productCollection->getTable('catalog_product_relation');
        $productCollection->getSelect()->join(
            ['pr' => $tableProductRelation],
            'e.entity_id = pr.child_id'
        )->where('pr.parent_id = ?', $parentId);
    }
private function addFilterByParent ( ProductCollection $ productCollection , $ parentId ) { $ tableProductRelation = $ productCollection -> getTable ( 'catalog_product_relation' ) ; $ productCollection -> getSelect ( ) -> join ( [ 'pr' => $ tableProductRelation ] , 'e.entity_id = pr.child_id' ) -> where ( 'pr.parent_id = ?' , $ parentId ) ; }
Filter a collection by its parent.
Inherited method since it's private in the parent.

@param ProductCollection $productCollection Product Collection
@param integer           $parentId          Parent Product Id

@return void
Filter a collection by its parent . Inherited method since it s private in the parent .