Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AddressSnapshot.php
Go to the documentation of this file.
1 <?php
7 
10 
12 {
16  public function isModified(DataObject $entity)
17  {
18  $result = parent::isModified($entity);
19 
20  if (!$result
21  && !$entity->getIsCustomerSaveTransaction()
22  && $this->isAddressDefault($entity)
23  ) {
24  return true;
25  }
26 
27  return $result;
28  }
29 
36  private function isAddressDefault(DataObject $entity)
37  {
38  return $entity->getId() && ($entity->getIsDefaultBilling() || $entity->getIsDefaultShipping());
39  }
40 }
$entity
Definition: element.phtml:22