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-customer
Model
ResourceModel
Address
Collection.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Customer\Model\ResourceModel\Address
;
7
15
class
Collection
extends
\Magento\Eav\Model\Entity\Collection\VersionControl\AbstractCollection
16
{
22
protected
function
_construct
()
23
{
24
$this->
_init
(\
Magento
\
Customer
\Model\Address::class, \
Magento
\
Customer
\Model\
ResourceModel
\Address::class);
25
}
26
33
public
function
setCustomerFilter
(
$customer
)
34
{
35
if
(is_array(
$customer
)) {
36
$this->
addAttributeToFilter
(
'parent_id'
, [
'in'
=>
$customer
]);
37
}
elseif
(
$customer
->getId()) {
38
$this->
addAttributeToFilter
(
'parent_id'
,
$customer
->getId());
39
}
else
{
40
$this->
addAttributeToFilter
(
'parent_id'
,
'-1'
);
41
}
42
return
$this;
43
}
44
}
Magento\Eav\Model\Entity\Collection\AbstractCollection\_init
_init($model, $entityModel)
Definition:
AbstractCollection.php:227
Magento\Customer\Model\ResourceModel\Address\Collection
Definition:
Collection.php:15
Magento\Catalog\Model\ResourceModel\Product
Definition:
CollectionTest.php:6
elseif
elseif(isset( $params[ 'redirect_parent']))
Definition:
iframe.phtml:17
Magento\Customer\Model\ResourceModel\Address
Definition:
CollectionTest.php:10
$customer
$customer
Definition:
customers.php:11
Magento\Customer\Model\ResourceModel\Address\Collection\_construct
_construct()
Definition:
Collection.php:22
Magento\Customer\Model\ResourceModel\Customer
Definition:
Customer.php:21
Magento
Magento\Eav\Model\Entity\Collection\AbstractCollection\addAttributeToFilter
addAttributeToFilter($attribute, $condition=null, $joinType='inner')
Definition:
AbstractCollection.php:348
Magento\Customer\Model\ResourceModel\Address\Collection\setCustomerFilter
setCustomerFilter($customer)
Definition:
Collection.php:33