Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-wishlist
Model
ResourceModel
Wishlist.php
Go to the documentation of this file.
1
<?php
12
namespace
Magento\Wishlist\Model\ResourceModel
;
13
18
class
Wishlist
extends
\Magento\Framework\Model\ResourceModel\Db\AbstractDb
19
{
25
protected
$_itemsCount
=
null
;
26
32
protected
$_customerIdFieldName
=
'customer_id'
;
33
39
protected
function
_construct
()
40
{
41
$this->
_init
(
'wishlist'
,
'wishlist_id'
);
42
}
43
52
protected
function
_getLoadSelect
($field,
$value
, $object)
53
{
54
$select
= parent::_getLoadSelect($field,
$value
, $object);
55
if
($field == $this->_customerIdFieldName) {
56
$select
->order(
'wishlist_id '
. \
Magento
\Framework\DB\
Select::SQL_ASC
)->limit(1);
57
}
58
return
$select
;
59
}
60
66
public
function
getCustomerIdFieldName
()
67
{
68
return
$this->_customerIdFieldName
;
69
}
70
77
public
function
setCustomerIdFieldName
($fieldName)
78
{
79
$this->_customerIdFieldName = $fieldName;
80
return
$this;
81
}
82
86
public
function
save
(\
Magento
\Framework\Model\
AbstractModel
$object)
87
{
88
$object->setHasDataChanges(
true
);
89
return
parent::save($object);
90
}
91
}
Magento\Wishlist\Model\ResourceModel\Wishlist\save
save(\Magento\Framework\Model\AbstractModel $object)
Definition:
Wishlist.php:86
Magento\Framework\Model\AbstractModel
Definition:
AbstractModel.php:19
Magento\Wishlist\Model\ResourceModel\Wishlist\_getLoadSelect
_getLoadSelect($field, $value, $object)
Definition:
Wishlist.php:52
Magento\Wishlist\Model\ResourceModel\Wishlist\$_itemsCount
$_itemsCount
Definition:
Wishlist.php:25
Magento\Wishlist\Model\ResourceModel\Wishlist\$_customerIdFieldName
$_customerIdFieldName
Definition:
Wishlist.php:32
Magento\Wishlist\Model\ResourceModel
Magento\Framework\Model\ResourceModel\Db\AbstractDb\_init
_init($mainTable, $idFieldName)
Definition:
AbstractDb.php:186
Magento\Wishlist\Model\ResourceModel\Wishlist\setCustomerIdFieldName
setCustomerIdFieldName($fieldName)
Definition:
Wishlist.php:77
$select
$select
Definition:
catalog_rule_10_off_not_logged_rollback.php:14
$value
$value
Definition:
gender.phtml:16
Magento\Wishlist\Model\ResourceModel\Wishlist\_construct
_construct()
Definition:
Wishlist.php:39
Magento
Magento\Framework\Model\ResourceModel\Db\AbstractDb
Definition:
AbstractDb.php:24
Magento\Wishlist\Model\ResourceModel\Wishlist\getCustomerIdFieldName
getCustomerIdFieldName()
Definition:
Wishlist.php:66
Magento\Wishlist\Model\ResourceModel\Wishlist
Definition:
Wishlist.php:18
Zend_Db_Select\SQL_ASC
const SQL_ASC
Definition:
Select.php:81