Customer/EventListener/CustomerListener.php
public function onInsert(ResourceEventInterface $event)
    {
        $customer = $this->getCustomerFromEvent($event);

        $changed = $this->generateNumber($customer);

        $changed |= $this->updateFromParent($customer);

        $changed |= $this->pricingUpdater->updateVatNumberSubject($customer);

        if ($changed) {
            $this->persistenceHelper->persistAndRecompute($customer);
        }
    }
public function onInsert(ResourceEventInterface $event)
    {
        $customer = $this->getCustomerFromEvent($event);

        $changed = $this->generateNumber($customer);

        $changed |= $this->updateFromParent($customer);

        $changed |= $this->pricingUpdater->updateVatNumberSubject($customer);

        if ($changed) {
            $this->persistenceHelper->persistAndRecompute($customer);
        }
    }
public function onInsert ( ResourceEventInterface $ event ) { $ customer = $ this -> getCustomerFromEvent ( $ event ) ; $ changed = $ this -> generateNumber ( $ customer ) ; $ changed |= $ this -> updateFromParent ( $ customer ) ; $ changed |= $ this -> pricingUpdater -> updateVatNumberSubject ( $ customer ) ; if ( $ changed ) { $ this -> persistenceHelper -> persistAndRecompute ( $ customer ) ; } }
Insert event handler.

@param ResourceEventInterface $event
Insert event handler .