Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Purchased.php
Go to the documentation of this file.
1 <?php
7 
35 {
41  protected function _construct()
42  {
43  $this->_init(\Magento\Downloadable\Model\ResourceModel\Link\Purchased::class);
44  parent::_construct();
45  }
46 
52  public function beforeSave()
53  {
54  if (null == $this->getOrderId()) {
55  throw new \Exception(__('Order id cannot be null'));
56  }
57  return parent::beforeSave();
58  }
59 }
__()
Definition: __.php:13