當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AbstractCollection::_initSelect方法代碼示例

本文整理匯總了PHP中Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::_initSelect方法的典型用法代碼示例。如果您正苦於以下問題:PHP AbstractCollection::_initSelect方法的具體用法?PHP AbstractCollection::_initSelect怎麽用?PHP AbstractCollection::_initSelect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Framework\Model\Resource\Db\Collection\AbstractCollection的用法示例。


在下文中一共展示了AbstractCollection::_initSelect方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _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:kid17,項目名稱:magento2,代碼行數:13,代碼來源:Collection.php

示例2: _initSelect

 /**
  * Initialize select, add country iso3 code and region name
  *
  * @return void
  */
 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);
     $this->addOrder('condition_value', self::SORT_ORDER_ASC);
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:14,代碼來源:Collection.php

示例3: _initSelect

 /**
  * Initialize select
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->addFieldToSelect(array('path', 'value'))->addFieldToFilter('scope', $this->_scope);
     if (!is_null($this->_scopeId)) {
         $this->addFieldToFilter('scope_id', $this->_scopeId);
     }
     return $this;
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:14,代碼來源:Scoped.php

示例4: _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:shabbirvividads,項目名稱:magento2,代碼行數:14,代碼來源:Scoped.php

示例5: _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:opexsw,項目名稱:magento2,代碼行數:11,代碼來源:Collection.php

示例6: _initSelect

 /**
  * Initialize select object
  *
  * @return $this
  */
 protected function _initSelect()
 {
     return parent::_initSelect()->getSelect()->join(array('cp_table' => $this->getTable('catalog_product_entity')), 'main_table.product_id = cp_table.entity_id', array('type_id'));
 }
開發者ID:pavelnovitsky,項目名稱:magento2,代碼行數:9,代碼來源:Collection.php

示例7: _initSelect

 /**
  * Init collection select
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->_joinTables();
     return $this;
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:11,代碼來源:Collection.php

示例8: _initSelect

 /**
  * Join reports info table
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->join(array('report' => $this->getTable('paypal_settlement_report')), 'report.report_id = main_table.report_id', array('report.account_id', 'report.report_date'));
     return $this;
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:11,代碼來源:Collection.php

示例9: _initSelect

 /**
  * Init collection select
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->_joinAttributeSet();
     return $this;
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:11,代碼來源:Collection.php

示例10: _initSelect

 /**
  * Init select
  *
  * @return \Magento\ImportExport\Model\Resource\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 != ?', History::IMPORT_VALIDATION);
     return $this;
 }
開發者ID:nja78,項目名稱:magento2,代碼行數:11,代碼來源:Collection.php

示例11: _initSelect

 /**
  * Initialize select object
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $select = $this->getSelect();
     $select->join(array('default_label' => $this->getTable('eav_form_fieldset_label')), 'main_table.fieldset_id = default_label.fieldset_id AND default_label.store_id = 0', array());
     if ($this->getStoreId() == 0) {
         $select->columns('label', 'default_label');
     } else {
         $labelExpr = $select->getAdapter()->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(array('store_label' => $this->getTable('eav_form_fieldset_label')), $joinCondition, array('label' => $labelExpr));
     }
     return $this;
 }
開發者ID:pavelnovitsky,項目名稱:magento2,代碼行數:19,代碼來源:Collection.php

示例12: _initSelect

 /**
  * Initialize db query
  *
  * @return void
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->addOrder('severity', self::SORT_ORDER_ASC)->addOrder('created_at');
 }
開發者ID:Atlis,項目名稱:docker-magento2,代碼行數:10,代碼來源:Collection.php

示例13: _initSelect

 /**
  * Initialize select
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->where("user_id > 0");
     return $this;
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:11,代碼來源:Collection.php

示例14: _initSelect

 /**
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->addOrder('notification_id', self::SORT_ORDER_DESC)->addFieldToFilter('is_read', array('neq' => 1))->addFieldToFilter('is_remove', array('neq' => 1))->addFieldToFilter('severity', \Magento\Framework\Notification\MessageInterface::SEVERITY_CRITICAL)->setPageSize(1);
     return $this;
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:9,代碼來源:Critical.php


注:本文中的Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::_initSelect方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。