/**
  * {@inheritdoc}
  */
 public function get($id, $storeId = null)
 {
     /** @var AgreementFactory $agreement */
     $agreement = $this->agreementFactory->create();
     $this->resourceModel->load($agreement, $id);
     if (!$agreement->getId()) {
         throw new NoSuchEntityException(__('Checkout agreement with specified ID "%1" not found.', $id));
     }
     return $agreement;
 }
Пример #2
0
 /**
  * Agreement factory getter
  * @return \Magento\CheckoutAgreements\Model\AgreementFactory
  */
 public function createAgreement()
 {
     return $this->agreementFactory->create();
 }