Common/EventListener/AbstractSaleItemListener.php
public function onPreDelete(ResourceEventInterface $event)
    {
        $this->throwIllegalOperationIfItemIsImmutable($event);

        $item = $this->getSaleItemFromEvent($event);

        if (null === $sale = $item->getSale()) {
            return;
        }

        $items = $sale->getItems()->toArray();
        foreach ($items as $item) {
            $this->loadItem($item);
        }
    }
public function onPreDelete(ResourceEventInterface $event)
    {
        $this->throwIllegalOperationIfItemIsImmutable($event);

        $item = $this->getSaleItemFromEvent($event);

        if (null === $sale = $item->getSale()) {
            return;
        }

        $items = $sale->getItems()->toArray();
        foreach ($items as $item) {
            $this->loadItem($item);
        }
    }
public function onPreDelete ( ResourceEventInterface $ event ) { $ this -> throwIllegalOperationIfItemIsImmutable ( $ event ) ; $ item = $ this -> getSaleItemFromEvent ( $ event ) ; if ( null === $ sale = $ item -> getSale ( ) ) { return ; } $ items = $ sale -> getItems ( ) -> toArray ( ) ; foreach ( $ items as $ item ) { $ this -> loadItem ( $ item ) ; } }
Pre delete event handler.

@param ResourceEventInterface $event

@throws IllegalOperationException
Pre delete event handler .