Supplier/EventListener/SupplierOrderListener.php
public function onInsert(ResourceEventInterface $event)
    {
        $order = $this->getSupplierOrderFromEvent($event);

        $changed = $this->updateNumber($order);

        $changed |= $this->updateState($order);

        $changed |= $this->updateTotals($order);

        $changed |= $this->updateExchangeRate($order);

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

        $changed = $this->updateNumber($order);

        $changed |= $this->updateState($order);

        $changed |= $this->updateTotals($order);

        $changed |= $this->updateExchangeRate($order);

        if ($changed) {
            $this->persistenceHelper->persistAndRecompute($order);
        }
    }
public function onInsert ( ResourceEventInterface $ event ) { $ order = $ this -> getSupplierOrderFromEvent ( $ event ) ; $ changed = $ this -> updateNumber ( $ order ) ; $ changed |= $ this -> updateState ( $ order ) ; $ changed |= $ this -> updateTotals ( $ order ) ; $ changed |= $ this -> updateExchangeRate ( $ order ) ; if ( $ changed ) { $ this -> persistenceHelper -> persistAndRecompute ( $ order ) ; } }
Insert event handler.

@param ResourceEventInterface $event
Insert event handler .