/** * {@inheritdoc} */ public function removeAdjustment(AdjustmentInterface $adjustment) { if (!$adjustment->isLocked() && $this->hasAdjustment($adjustment)) { $adjustment->setAdjustable(null); $this->adjustments->removeElement($adjustment); } }
/** * {@inheritdoc} */ public function removeAdjustment(AdjustmentInterface $adjustment) { if ($this->hasAdjustment($adjustment)) { $adjustment->setAdjustable(null); $this->adjustments->removeElement($adjustment); } return $this; }
/** * {@inheritdoc} */ public function removeAdjustment(AdjustmentInterface $adjustment) { if ($adjustment->isLocked() || !$this->hasAdjustment($adjustment)) { return; } $this->adjustments->removeElement($adjustment); $this->subtractFromAdjustmentsTotal($adjustment); $this->orderItem->recalculateUnitsTotal(); $adjustment->setAdjustable(null); }
/** * {@inheritdoc} */ public function removeAdjustments($type) { foreach ($this->getAdjustments($type) as $adjustment) { if ($adjustment->isLocked()) { continue; } $adjustment->setAdjustable(null); $this->adjustments->removeElement($adjustment); } }