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


PHP AbstractCollection::_initSelect方法代码示例

本文整理汇总了PHP中Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection::_initSelect方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractCollection::_initSelect方法的具体用法?PHP AbstractCollection::_initSelect怎么用?PHP AbstractCollection::_initSelect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection的用法示例。


在下文中一共展示了AbstractCollection::_initSelect方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _initSelect

 public function _initSelect()
 {
     parent::_initSelect();
     $this->_select->joinLeft(['country_table' => $this->_countryTable], 'country_table.country_id = main_table.dest_country_id', ['dest_country' => 'iso3_code'])->joinLeft(['region_table' => $this->_regionTable], 'region_table.region_id = main_table.dest_region_id', ['dest_region' => 'code']);
     $this->addOrder('dest_country', self::SORT_ORDER_ASC);
     $this->addOrder('dest_region', self::SORT_ORDER_ASC);
     $this->addOrder('dest_zip', self::SORT_ORDER_ASC);
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:8,代码来源:Collection.php

示例2: _initSelect

 /**
  * Initialize select object
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $locale = $this->_localeResolver->getLocale();
     $this->addBindParam(':region_locale', $locale);
     $this->getSelect()->joinLeft(['rname' => $this->_regionNameTable], 'main_table.region_id = rname.region_id AND rname.locale = :region_locale', ['name']);
     return $this;
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:13,代码来源:Collection.php

示例3: _initSelect

 /**
  * Initialize select
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->addFieldToSelect(['path', 'value'])->addFieldToFilter('scope', $this->_scope);
     if ($this->_scopeId !== null) {
         $this->addFieldToFilter('scope_id', $this->_scopeId);
     }
     return $this;
 }
开发者ID:tingyeeh,项目名称:magento2,代码行数:14,代码来源:Scoped.php

示例4: _initSelect

 /**
  * Initialize select
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->where("user_id > 0");
     return $this;
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:11,代码来源:Collection.php

示例5: _initSelect

 /**
  * Initialize select object
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $select = $this->getSelect();
     $select->join(['default_label' => $this->getTable('eav_form_fieldset_label')], 'main_table.fieldset_id = default_label.fieldset_id AND default_label.store_id = 0', []);
     if ($this->getStoreId() == 0) {
         $select->columns('label', 'default_label');
     } else {
         $labelExpr = $select->getConnection()->getIfNullSql('store_label.label', 'default_label.label');
         $joinCondition = $this->getConnection()->quoteInto('main_table.fieldset_id = store_label.fieldset_id AND store_label.store_id = ?', (int) $this->getStoreId());
         $select->joinLeft(['store_label' => $this->getTable('eav_form_fieldset_label')], $joinCondition, ['label' => $labelExpr]);
     }
     return $this;
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:19,代码来源:Collection.php

示例6: _initSelect

 /**
  * Initialize db query
  *
  * @return void
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->addOrder('severity', self::SORT_ORDER_ASC)->addOrder('created_at');
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:10,代码来源:Collection.php

示例7: _initSelect

 /**
  * Init select
  *
  * @return \Magento\ImportExport\Model\ResourceModel\History\Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->joinLeft(['link_table' => $this->_linkTable], 'link_table.user_id = main_table.user_id', ['username'])->where('execution_time != ? OR (error_file != "" AND execution_time = ?)', History::IMPORT_VALIDATION, History::IMPORT_VALIDATION);
     return $this;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:11,代码来源:Collection.php

示例8: _initSelect

 /**
  * @return void
  * @throws \Exception
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->join(['cpe' => $this->getTable('catalog_product_entity')], sprintf('cpe.%s = main_table.product_id', $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField()), []);
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:9,代码来源:Collection.php

示例9: _initSelect

 /**
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->addOrder('notification_id', self::SORT_ORDER_DESC)->addFieldToFilter('is_read', ['neq' => 1])->addFieldToFilter('is_remove', ['neq' => 1])->addFieldToFilter('severity', \Magento\Framework\Notification\MessageInterface::SEVERITY_CRITICAL)->setPageSize(1);
     return $this;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:9,代码来源:Critical.php

示例10: _initSelect

 /**
  * {@inheritdoc}
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->where('main_table.post_status=?', 'publish');
     return $this;
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:9,代码来源:Collection.php

示例11: _initSelect

 /**
  * Join reports info table
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->join(['report' => $this->getTable('paypal_settlement_report')], 'report.report_id = main_table.report_id', ['report.account_id', 'report.report_date']);
     return $this;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:11,代码来源:Collection.php

示例12: _initSelect

 /**
  * Initialize select
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->join(['detail' => $this->getReviewDetailTable()], 'main_table.review_id = detail.review_id', ['detail_id', 'title', 'detail', 'nickname', 'customer_id']);
     return $this;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:11,代码来源:Collection.php


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