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


PHP AbstractDb::_getLoadSelect方法代码示例

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


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

示例1: _getLoadSelect

 /**
  * Retrieve select object for load object data
  *
  * @param string $field
  * @param mixed $value
  * @param \Ashsmith\Blog\Model\Post $object
  * @return \Zend_Db_Select
  */
 protected function _getLoadSelect($field, $value, $object)
 {
     $select = parent::_getLoadSelect($field, $value, $object);
     if ($object->getStoreId()) {
         $select->where('is_active = ?', 1)->limit(1);
     }
     return $select;
 }
开发者ID:luxwan13,项目名称:magento2-learning,代码行数:16,代码来源:Post.php

示例2: _getLoadByMethodIDSelect

 /**
  * Retrieve load select with filter by url_key and activity
  *
  * @param string $url_key
  * @param int $isActive
  * @return \Magento\Framework\DB\Select
  */
 protected function _getLoadByMethodIDSelect($method_id, $isActive = null)
 {
     $select = parent::_getLoadSelect('method_id', $method_id, null);
     if (!is_null($isActive)) {
         $select->where('active = ?', !empty($isActive) ? 1 : 0);
     }
     return $select;
 }
开发者ID:smart2pay,项目名称:magento20,代码行数:15,代码来源:Method.php

示例3: _getLoadSelect

 /**
  * Prepare wishlist load select query
  *
  * @param string $field
  * @param mixed $value
  * @param \Magento\Framework\Model\AbstractModel $object
  * @return \Magento\Framework\DB\Select
  */
 protected function _getLoadSelect($field, $value, $object)
 {
     $select = parent::_getLoadSelect($field, $value, $object);
     if ($field == $this->_customerIdFieldName) {
         $select->order('wishlist_id ' . \Magento\Framework\DB\Select::SQL_ASC)->limit(1);
     }
     return $select;
 }
开发者ID:IlyaGluschenko,项目名称:test001,代码行数:16,代码来源:Wishlist.php

示例4: _getLoadSelect

 /**
  * Add expiration date filter to select
  *
  * @param string $field
  * @param mixed $value
  * @param \Magento\Persistent\Model\Session $object
  * @return \Magento\Framework\DB\Select
  */
 protected function _getLoadSelect($field, $value, $object)
 {
     $select = parent::_getLoadSelect($field, $value, $object);
     if (!$object->getLoadExpired()) {
         $tableName = $this->getMainTable();
         $select->join(['customer' => $this->getTable('customer_entity')], 'customer.entity_id = ' . $tableName . '.customer_id')->where($tableName . '.updated_at >= ?', $object->getExpiredBefore());
     }
     return $select;
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:17,代码来源:Session.php

示例5: _getLoadByCountryIDSelect

 /**
  * Retrieve load select with filter by country_id
  *
  * @param string $url_key
  * @param null|\Magento\Framework\DB\Select $select
  * @return \Magento\Framework\DB\Select
  */
 protected function _getLoadByCountryIDSelect($country_id, $select = null)
 {
     if (empty($select)) {
         $select = parent::_getLoadSelect('country_id', $country_id, null);
     } else {
         $select->where('country_id = ?', $country_id);
     }
     return $select;
 }
开发者ID:smart2pay,项目名称:magento20,代码行数:16,代码来源:ConfiguredMethods.php

示例6: _getLoadSelect

 /**
  * Retrieve select object for load object data
  *
  * @param string $field
  * @param mixed $value
  * @param \Magento\Review\Model\Rating $object
  * @return \Magento\Framework\DB\Select
  */
 protected function _getLoadSelect($field, $value, $object)
 {
     $connection = $this->getConnection();
     $table = $this->getMainTable();
     $storeId = (int) $this->_storeManager->getStore(\Magento\Store\Model\Store::ADMIN_CODE)->getId();
     $select = parent::_getLoadSelect($field, $value, $object);
     $codeExpr = $connection->getIfNullSql('title.value', "{$table}.rating_code");
     $select->joinLeft(['title' => $this->getTable('rating_title')], $connection->quoteInto("{$table}.rating_id = title.rating_id AND title.store_id = ?", $storeId), ['rating_code' => $codeExpr]);
     return $select;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:18,代码来源:Rating.php

示例7: _getLoadSelect

 /**
  * Retrieve select object for load object data
  *
  * @param string $field
  * @param mixed $value
  * @param \Magento\UrlRewrite\Model\UrlRewrite $object
  * @return \Magento\Framework\DB\Select
  */
 protected function _getLoadSelect($field, $value, $object)
 {
     /** @var $select \Magento\Framework\DB\Select */
     $select = parent::_getLoadSelect($field, $value, $object);
     if ($object->getStoreId() !== null) {
         $select->where('store_id IN(?)', [\Magento\Store\Model\Store::DEFAULT_STORE_ID, $object->getStoreId()]);
         $select->order('store_id ' . \Magento\Framework\DB\Select::SQL_DESC);
         $select->limit(1);
     }
     return $select;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:19,代码来源:UrlRewrite.php

示例8: _getLoadSelect

 /**
  * Retrieve select object for load object data
  *
  * @param string $field
  * @param mixed $value
  * @param \Magento\Framework\Model\AbstractModel $object
  * @return \Magento\Framework\DB\Select
  */
 protected function _getLoadSelect($field, $value, $object)
 {
     $select = parent::_getLoadSelect($field, $value, $object);
     $connection = $this->getConnection();
     $locale = $this->_localeResolver->getLocale();
     $systemLocale = \Magento\Framework\AppInterface::DISTRO_LOCALE_CODE;
     $regionField = $connection->quoteIdentifier($this->getMainTable() . '.' . $this->getIdFieldName());
     $condition = $connection->quoteInto('lrn.locale = ?', $locale);
     $select->joinLeft(['lrn' => $this->_regionNameTable], "{$regionField} = lrn.region_id AND {$condition}", []);
     if ($locale != $systemLocale) {
         $nameExpr = $connection->getCheckSql('lrn.region_id is null', 'srn.name', 'lrn.name');
         $condition = $connection->quoteInto('srn.locale = ?', $systemLocale);
         $select->joinLeft(['srn' => $this->_regionNameTable], "{$regionField} = srn.region_id AND {$condition}", ['name' => $nameExpr]);
     } else {
         $select->columns(['name'], 'lrn');
     }
     return $select;
 }
开发者ID:tingyeeh,项目名称:magento2,代码行数:26,代码来源:Region.php

示例9: _getLoadSelect

 /**
  * Default select items not yet exported
  *
  * @param string $field
  * @param mixed $value
  * @param \Magento\Framework\Model\AbstractModel $object
  * @return \Magento\Framework\DB\Select
  */
 protected function _getLoadSelect($field, $value, $object)
 {
     $select = parent::_getLoadSelect($field, $value, $object);
     $select->where('is_exported = ?', 0)->limit(1);
     return $select;
 }
开发者ID:richdynamix,项目名称:personalised-products,代码行数:14,代码来源:Export.php

示例10: _getLoadSelect

 /**
  * Retrieve select object for load object data
  *
  * @param string $field
  * @param mixed $value
  * @param \Magento\Framework\Model\AbstractModel $object
  * @return \Magento\Framework\DB\Select
  */
 protected function _getLoadSelect($field, $value, $object)
 {
     $select = parent::_getLoadSelect($field, $value, $object);
     return $select;
 }
开发者ID:mrbadao,项目名称:magento-ce,代码行数:13,代码来源:Store.php

示例11: _getLoadByCodeSelect

 /**
  * Retrieve load select with filter by country code
  *
  * @param string $code
  * @return \Magento\Framework\DB\Select
  */
 protected function _getLoadByCodeSelect($code)
 {
     $select = parent::_getLoadSelect('code', $code, null);
     return $select;
 }
开发者ID:smart2pay,项目名称:magento20,代码行数:11,代码来源:Country.php

示例12: _getLoadSelect

 /**
  * Retrieve select object for load object data
  *
  * @param string $field
  * @param mixed $value
  * @param \Msd\Statistics\Model\Statistics\ $object
  * @return \Zend_Db_Select
  */
 protected function _getLoadSelect($field, $value, $object)
 {
     $select = parent::_getLoadSelect($field, $value, $object);
     $select->where('active = ?', 1);
     return $select;
 }
开发者ID:magestackday,项目名称:msd-statistics,代码行数:14,代码来源:Statistics.php

示例13: _getLoadSelect

 /**
  * Retrieve select for load
  *
  * @param String $field
  * @param String $value
  * @param \Magento\Framework\Model\AbstractModel $object
  * @return \Magento\Framework\DB\Select
  */
 protected function _getLoadSelect($field, $value, $object)
 {
     $select = parent::_getLoadSelect($field, $value, $object);
     $select->where('store_id = ?', \Magento\Store\Model\Store::DEFAULT_STORE_ID);
     return $select;
 }
开发者ID:razbakov,项目名称:magento2,代码行数:14,代码来源:StringUtils.php

示例14: _getLoadSelect

 /**
  * Retrieve select object for load object data
  *
  * @param string $field
  * @param mixed $value
  * @param \Magento\Eav\Model\Form\Element $object
  * @return \Magento\Framework\DB\Select
  */
 protected function _getLoadSelect($field, $value, $object)
 {
     $select = parent::_getLoadSelect($field, $value, $object);
     $select->join($this->getTable('eav_attribute'), $this->getTable('eav_attribute') . '.attribute_id = ' . $this->getMainTable() . '.attribute_id', ['attribute_code', 'entity_type_id']);
     return $select;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:14,代码来源:Element.php

示例15: _getLoadSelect

 /**
  * Retrieve select object for load object data
  *
  * @param string $field
  * @param mixed $value
  * @param \Magento\Framework\Model\AbstractModel $object
  * @return $this
  */
 protected function _getLoadSelect($field, $value, $object)
 {
     $select = parent::_getLoadSelect($field, $value, $object);
     $this->_addValueToSelect($select, $object->getStoreId());
     return $select;
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:14,代码来源:Variable.php


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