本文整理汇总了PHP中Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::_renderFiltersBefore方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractCollection::_renderFiltersBefore方法的具体用法?PHP AbstractCollection::_renderFiltersBefore怎么用?PHP AbstractCollection::_renderFiltersBefore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Framework\Model\Resource\Db\Collection\AbstractCollection
的用法示例。
在下文中一共展示了AbstractCollection::_renderFiltersBefore方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _renderFiltersBefore
/**
* Apply custom filtering
*
* @return void
*/
protected function _renderFiltersBefore()
{
if (!$this->getLoadDefault()) {
$this->getSelect()->where('main_table.website_id > ?', 0);
}
parent::_renderFiltersBefore();
}
示例2: _renderFiltersBefore
/**
* Join store relation table if there is store filter
*
* @return void
*/
protected function _renderFiltersBefore()
{
if ($this->getFilter('store')) {
$this->getSelect()->join(['store_table' => $this->getTable('cms_page_store')], 'main_table.page_id = store_table.page_id', [])->group('main_table.page_id');
}
parent::_renderFiltersBefore();
}
示例3: _renderFiltersBefore
protected function _renderFiltersBefore()
{
parent::_renderFiltersBefore();
}
示例4: _renderFiltersBefore
/**
* Join store relation table if there is store filter
*
* @return void
*/
protected function _renderFiltersBefore()
{
if ($this->getFilter('store')) {
$this->getSelect()->join(array('store_table' => $this->getTable('cms_block_store')), 'main_table.block_id = store_table.block_id', array())->group('main_table.block_id');
}
return parent::_renderFiltersBefore();
}
示例5: joinStoreRelationTable
/**
* Join store relation table if there is store filter
*
* @param string $tableName
* @param string $columnName
* @return void
*/
protected function joinStoreRelationTable($tableName, $columnName)
{
if ($this->getFilter('store')) {
$this->getSelect()->join(['store_table' => $this->getTable($tableName)], 'main_table.' . $columnName . ' = store_table.' . $columnName, [])->group('main_table.' . $columnName);
}
parent::_renderFiltersBefore();
}