33 \Psr\Log\LoggerInterface
$logger,
35 \
Magento\Framework\Event\ManagerInterface $eventManager,
73 [
'cpe' => $this->
getTable(
'catalog_product_entity')],
75 'cpe.%s = main_table.product_id',
76 $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField()
97 $ifNullDefaultTitle = $this->
getConnection()->getIfNullSql(
'st.title',
'd.title');
100 [
'd' => $this->
getTable(
'downloadable_link_title')],
101 'd.link_id = main_table.link_id AND d.store_id = 0',
102 [
'default_title' =>
'title']
104 [
'st' => $this->
getTable(
'downloadable_link_title')],
105 'st.link_id=main_table.link_id AND st.store_id = ' . (
int)
$storeId,
107 'store_title' =>
'title',
108 'title' => $ifNullDefaultTitle
110 )->order(
'main_table.sort_order ASC')
111 ->order(
'title ASC');
123 $ifNullDefaultPrice = $this->
getConnection()->getIfNullSql(
'stp.price',
'dp.price');
125 [
'dp' => $this->
getTable(
'downloadable_link_price')],
126 'dp.link_id=main_table.link_id AND dp.website_id = 0',
127 [
'default_price' =>
'price']
129 [
'stp' => $this->
getTable(
'downloadable_link_price')],
130 'stp.link_id=main_table.link_id AND stp.website_id = ' . (
int)
$websiteId,
131 [
'website_price' =>
'price',
'price' => $ifNullDefaultPrice]
addFieldToFilter($attribute, $condition=null)
addPriceToResult($websiteId)
addProductToFilter($product)
_init($model, $resourceModel)
addTitleToResult($storeId=0)
join($table, $cond, $cols=' *')
__construct(\Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\EntityManager\MetadataPool $metadataPool, \Magento\Framework\DB\Adapter\AdapterInterface $connection=null, \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource=null)