本文整理汇总了PHP中Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection::_renderFiltersBefore方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractCollection::_renderFiltersBefore方法的具体用法?PHP AbstractCollection::_renderFiltersBefore怎么用?PHP AbstractCollection::_renderFiltersBefore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
的用法示例。
在下文中一共展示了AbstractCollection::_renderFiltersBefore方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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('magefan_blog_category_store')], 'main_table.category_id = store_table.category_id', []);
}
parent::_renderFiltersBefore();
}
示例3: 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();
}
示例4: _renderFiltersBefore
/**
* Join store relation table if there is store filter
*
* @return void
*/
protected function _renderFiltersBefore()
{
if ($this->getFilter('store_id')) {
$this->getSelect()->join(['store_table' => $this->getTable('gemtoo_blog_article_store')], 'main_table.article_id = store_table.article_id', [])->group('main_table.article_id');
}
parent::_renderFiltersBefore();
}
示例5: _renderFiltersBefore
/**
* Join store relation table if there is store filter
*
* @return void
*/
protected function _renderFiltersBefore()
{
foreach (array('store', 'category') as $key) {
if ($this->getFilter($key)) {
$this->getSelect()->join([$key . '_table' => $this->getTable('magefan_blog_post_' . $key)], 'main_table.post_id = ' . $key . '_table.post_id', [])->group('main_table.post_id');
}
}
parent::_renderFiltersBefore();
}
示例6: _renderFiltersBefore
/**
* Join store relation table if there is store filter
*
* @SuppressWarnings(PHPMD.CamelCaseMethodName)
*/
protected function _renderFiltersBefore()
{
if ($this->getFilter('store')) {
$this->getSelect()->join(['store_table' => $this->getTable(ThesaurusInterface::STORE_TABLE_NAME)], 'main_table.' . ThesaurusInterface::THESAURUS_ID . ' = store_table.' . ThesaurusInterface::THESAURUS_ID, [])->group('main_table.' . ThesaurusInterface::THESAURUS_ID);
}
parent::_renderFiltersBefore();
}