- /**
- * Join tables from conditions combination to collection
- *
- * @param \Magento\Eav\Model\Entity\Collection\AbstractCollection $collection
- * @param Combine $combine
- * @return $this
- */
- protected function _joinTablesToCollection(
- \Magento\Eav\Model\Entity\Collection\AbstractCollection $collection,
- Combine $combine
- ) {
- foreach ($this->_getCombineTablesToJoin($combine) as $alias => $joinTable) {
- /** @var $condition AbstractCondition */
- $collection->getSelect()->joinLeft(
- [$alias => $collection->getResource()->getTable($joinTable['name'])],
- $joinTable['condition'],
- isset($joinTable['columns']) ? $joinTable['columns'] : '*'
- );
- }
- return $this;
- }