本文整理匯總了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();
}