本文整理汇总了PHP中Mage_Core_Model_Resource_Db_Abstract::_getLoadSelect方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Resource_Db_Abstract::_getLoadSelect方法的具体用法?PHP Mage_Core_Model_Resource_Db_Abstract::_getLoadSelect怎么用?PHP Mage_Core_Model_Resource_Db_Abstract::_getLoadSelect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Resource_Db_Abstract
的用法示例。
在下文中一共展示了Mage_Core_Model_Resource_Db_Abstract::_getLoadSelect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _getLoadSelect
/**
* Add expiration date filter to select
*
* @param string $field
* @param mixed $value
* @param Mage_Persistent_Model_Session $object
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if (!$object->getLoadExpired()) {
$select->where('updated_at >= ?', $object->getExpiredBefore());
}
return $select;
}
示例2: _getLoadSelect
/**
* Prepare wishlist load select query
*
* @param string $field
* @param mixed $value
* @param mixed $object
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($field == $this->_customerIdFieldName) {
$select->order('wishlist_id ' . Zend_Db_Select::SQL_ASC)->limit(1);
}
return $select;
}
示例3: _getLoadSelect
/**
* Retrieve the load select object
*
* @param string $field
* @param mixed $value
* @param Mage_Core_Model_Abstract $object
* @return Varien_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if (!Mage::app()->isSingleStoreMode() && Mage::app()->getStore()->getId() > 0) {
$select->where('store_id IN (?)', array(0, Mage::app()->getStore()->getId()))->order('store_id DESC')->limit(1);
}
return $select;
}
示例4: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @param Mage_Core_Model_Abstract $object
*
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$select->join(array('cps' => $this->getTable('store')), $this->getMainTable() . '.slideshow_id = `cps`.slideshow_id')->where('`cps`.store_id in (0, ?) ', $object->getStoreId())->order('store_id DESC')->limit(1);
}
return $select;
}
示例5: _getLoadSelect
/**
* Retrieve select object for load object data.
*
* @param string $field The field.
* @param mixed $value The value.
* @param Rootd_Link_Model_Node $object The link model.
*
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if (!is_null($object->getStoreId())) {
$select->where('store_id IN(?)', array(Mage_Core_Model_App::ADMIN_STORE_ID, $object->getStoreId()))->order('store_id ' . Varien_Db_Select::SQL_DESC)->limit(1);
}
return $select;
}
示例6: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @param DB1_AnyMarket_Model_Anymarketattributes $object
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$storeIds = array(Mage_Core_Model_App::ADMIN_STORE_ID, (int) $object->getStoreId());
$select->join(array('anymarket_anymarketattributes_store' => $this->getTable('db1_anymarket/anymarketattributes_store')), $this->getMainTable() . '.entity_id = anymarket_anymarketattributes_store.anymarketattributes_id', array())->where('anymarket_anymarketattributes_store.store_id IN (?)', $storeIds)->order('anymarket_anymarketattributes_store.store_id DESC')->limit(1);
}
return $select;
}
示例7: _getLoadSelect
/**
* Add expiration date filter to select
*
* @param string $field
* @param mixed $value
* @param Mage_Persistent_Model_Session $object
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if (!$object->getLoadExpired()) {
$tableName = $this->getMainTable();
$select->join(array('customer' => $this->getTable('customer/entity')), 'customer.entity_id = ' . $tableName . '.customer_id')->where($tableName . '.updated_at >= ?', $object->getExpiredBefore());
}
return $select;
}
示例8: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @param Zoffio_DiscountTypes_Model_Title $object
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$storeIds = array(Mage_Core_Model_App::ADMIN_STORE_ID, (int) $object->getStoreId());
$select->join(array('discounttypes_title_store' => $this->getTable('zoffio_discounttypes/title_store')), $this->getMainTable() . '.entity_id = discounttypes_title_store.title_id', array())->where('discounttypes_title_store.store_id IN (?)', $storeIds)->order('discounttypes_title_store.store_id DESC')->limit(1);
}
return $select;
}
示例9: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @param Esendex_Sms_Model_Trigger $object
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$storeIds = [Mage_Core_Model_App::ADMIN_STORE_ID, (int) $object->getStoreId()];
$select->join(['sms_trigger_store' => $this->getTable('esendex_sms/trigger_store')], $this->getMainTable() . '.entity_id = sms_trigger_store.trigger_id', [])->where('sms_trigger_store.store_id IN (?)', $storeIds)->order('sms_trigger_store.store_id DESC')->limit(1);
}
return $select;
}
示例10: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @param Iou_UltimatePopUp_Model_Popup_Comment $object
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$storeIds = array(Mage_Core_Model_App::ADMIN_STORE_ID, (int) $object->getStoreId());
$select->join(array('ultimatepopup_popup_comment_store' => $this->getTable('iou_ultimatepopup/popup_comment_store')), $this->getMainTable() . '.comment_id = ultimatepopup_popup_comment_store.comment_id', array())->where('ultimatepopup_popup_comment_store.store_id IN (?)', $storeIds)->order('ultimatepopup_popup_comment_store.store_id DESC')->limit(1);
}
return $select;
}
示例11: _getLoadSelect
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$stores = array((int) $object->getStoreId(), Mage_Core_Model_App::ADMIN_STORE_ID);
$select->join(array('tas' => $this->getTable('themeframework/page_store')), $this->getMainTable() . '.page_id = tas.page_id', array('store_id'))->where('status = ?', 1)->where('tas.store_id in (?) ', $stores)->order('store_id DESC')->limit(1);
}
return $select;
}
示例12: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
if ($field == 'default_state') {
$select = $this->_getReadAdapter()->select()->from($this->getMainTable(), array('label'))->join(array('state_table' => $this->_stateTable), $this->getMainTable() . '.status = state_table.status', 'status')->where('state_table.state = ?', $value)->order('state_table.is_default DESC')->limit(1);
} else {
$select = parent::_getLoadSelect($field, $value, $object);
}
return $select;
}
示例13: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @param Devils_HomeWidget_Model_Image $object
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$storeIds = array(Mage_Core_Model_App::ADMIN_STORE_ID, (int) $object->getStoreId());
$select->join(array('dhis' => $this->getTable('devils_homewidget/image_store')), $this->getMainTable() . '.entity_id = dhis.entity_id', array())->where('is_active = ?', 1)->where('dhis.store_id IN (?)', $storeIds)->order('dhis.store_id DESC')->limit(1);
}
return $select;
}
示例14: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @param Mage_Core_Model_Abstract $object
*
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$storeIds = array(Mage_Core_Model_App::ADMIN_STORE_ID, (int) $object->getStoreId());
$select->join(array('demac_multilocationinventory_stores' => $this->getTable('demac_multilocationinventory/stores')), $this->getMainTable() . '.id = demac_multilocationinventory_stores.location_id', array())->where('demac_multilocationinventory_stores.store_id IN (?)', $storeIds)->order('demac_multilocationinventory_stores.store_id DESC')->limit(1);
}
return $select;
}
示例15: _getLoadSelect
/**
* Retrieve select object for load object data
*
* @param string $field
* @param mixed $value
* @param Ibrams_CmsExtended_Model_Cmspage $object
* @return Zend_Db_Select
*/
protected function _getLoadSelect($field, $value, $object)
{
$select = parent::_getLoadSelect($field, $value, $object);
if ($object->getStoreId()) {
$storeIds = array(Mage_Core_Model_App::ADMIN_STORE_ID, (int) $object->getStoreId());
$select->join(array('cmsextended_cmspage_store' => $this->getTable('ibrams_cmsextended/cmspage_store')), $this->getMainTable() . '.entity_id = cmsextended_cmspage_store.cmspage_id', array())->where('cmsextended_cmspage_store.store_id IN (?)', $storeIds)->order('cmsextended_cmspage_store.store_id DESC')->limit(1);
}
return $select;
}