code: public function onParentChange(ResourceEventInterface $event)
      {
          $customer = $this->getCustomerFromEvent($event);
  
          if ($this->updateFromParent($customer)) {
              $this->persistenceHelper->persistAndRecompute($customer, true);
          }
      }
docs: "Parent has changed" event handler.
  
  @param ResourceEventInterface $event