/**
  * @internal
  *
  * @param $index
  * @return bool
  */
 public function deleteItem($index)
 {
     $oldItem = parent::deleteItem($index);
     /** @var Order $order */
     $order = $this->getOrder();
     return $order->onPropertyValueCollectionModify(EventActions::DELETE, $oldItem);
 }
Example #2
0
 /**
  * @internal
  *
  * @param $index
  * @return mixed|void
  * @throws Main\ArgumentOutOfRangeException
  * @throws Main\NotSupportedException
  * @throws Main\ObjectNotFoundException
  */
 public function deleteItem($index)
 {
     $oldItem = parent::deleteItem($index);
     /** @var Order $order */
     if ($order = $this->getOrder()) {
         $order->onBasketModify(EventActions::DELETE, $oldItem);
     }
 }
Example #3
0
 /**
  * @internal
  *
  * @param $index
  * @return mixed|void
  * @throws Main\ArgumentOutOfRangeException
  */
 public function deleteItem($index)
 {
     $result = new Result();
     /** @var Shipment $oldItem */
     $oldItem = parent::deleteItem($index);
     /** @var Shipment $systemShipment */
     if ($oldItem->getId() > 0 && !$oldItem->isSystem() && ($systemShipment = $this->getSystemShipment()) && $systemShipment->getId() == 0) {
         $r = $this->cloneShipment($oldItem, $systemShipment);
         if (!$r->isSuccess()) {
             $result->addErrors($r->getErrors());
         }
     }
     $order = $this->getOrder();
     $order->onShipmentCollectionModify(EventActions::DELETE, $oldItem);
 }
 /**
  * @internal
  *
  * @param $index
  * @return bool
  */
 public static function deleteItem($index)
 {
     $oldItem = parent::deleteItem($index);
 }
 /**
  * @internal
  *
  * @param $index
  * @return mixed|void
  * @throws Main\ArgumentOutOfRangeException
  * @throws Main\NotSupportedException
  */
 public function deleteItem($index)
 {
     $oldShipmentItem = parent::deleteItem($index);
     $shipment = $this->getShipment();
     $shipment->onShipmentItemCollectionModify(EventActions::DELETE, $oldShipmentItem);
 }