当前位置: 首页>>代码示例>>PHP>>正文


PHP AbstractCollection::_renderFiltersBefore方法代码示例

本文整理汇总了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();
 }
开发者ID:tingyeeh,项目名称:magento2,代码行数:12,代码来源:Collection.php

示例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();
 }
开发者ID:samitrimal,项目名称:Blog-Extension-for-Magento-2,代码行数:12,代码来源:Collection.php

示例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();
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:14,代码来源:AbstractCollection.php

示例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();
 }
开发者ID:pleminh,项目名称:Gemtoo,代码行数:12,代码来源:Collection.php

示例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();
 }
开发者ID:SilvanLaroo,项目名称:Blog-Extension-for-Magento-2,代码行数:14,代码来源:Collection.php

示例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();
 }
开发者ID:smile-sa,项目名称:elasticsuite,代码行数:12,代码来源:Collection.php


注:本文中的Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection::_renderFiltersBefore方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。