Пример #1
0
 /**
  * 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;
 }
Пример #2
0
 /**
  * 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);
 }
Пример #3
0
 /**
  * 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;
 }
Пример #4
0
 /**
  * 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;
 }
Пример #5
0
 /**
  * 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;
 }
Пример #6
0
 /**
  * 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'));
 }
Пример #7
0
 /**
  * Init collection select
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->_joinTables();
     return $this;
 }
Пример #8
0
 /**
  * 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;
 }
Пример #9
0
 /**
  * Init collection select
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->_joinAttributeSet();
     return $this;
 }
Пример #10
0
 /**
  * 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;
 }
Пример #11
0
 /**
  * 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;
 }
Пример #12
0
 /**
  * Initialize db query
  *
  * @return void
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->addOrder('severity', self::SORT_ORDER_ASC)->addOrder('created_at');
 }
Пример #13
0
 /**
  * Initialize select
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->getSelect()->where("user_id > 0");
     return $this;
 }
Пример #14
0
 /**
  * @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;
 }