Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-downloadable
Model
Link
Purchased.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Downloadable\Model\Link
;
7
34
class
Purchased
extends
\Magento\Framework\Model\AbstractModel
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
}
Magento\Framework\Model\AbstractModel
Definition:
AbstractModel.php:19
Magento\Catalog\Model\ResourceModel\Product
Definition:
CollectionTest.php:6
__
__()
Definition:
__.php:13
Magento\Downloadable\Model\Link
Definition:
Builder.php:6
Magento\Downloadable\Model\Link\Purchased\beforeSave
beforeSave()
Definition:
Purchased.php:52
Magento\Downloadable\Model\Link
Definition:
Link.php:21
Magento
Magento\Downloadable\Model\Link\Purchased\_construct
_construct()
Definition:
Purchased.php:41
Magento\Downloadable\Model\Link\Purchased
Definition:
Purchased.php:34
Magento\Framework\Model\AbstractModel\_init
_init($resourceModel)
Definition:
AbstractModel.php:213