Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AccessChangeQuoteControl.php
Go to the documentation of this file.
1 <?php
8 
13 
18 {
22  private $changeQuoteControl;
23 
27  public function __construct(ChangeQuoteControlInterface $changeQuoteControl)
28  {
29  $this->changeQuoteControl = $changeQuoteControl;
30  }
31 
43  {
44  if (! $this->changeQuoteControl->isAllowed($quote)) {
45  throw new StateException(__("Invalid state change requested"));
46  }
47  }
48 }
$quote
__()
Definition: __.php:13
beforeSave(CartRepositoryInterface $subject, CartInterface $quote)