Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Collection.php
Go to the documentation of this file.
1 <?php
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 }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
$customer
Definition: customers.php:11
addAttributeToFilter($attribute, $condition=null, $joinType='inner')