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
Item.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Downloadable\Model\Link\Purchased
;
7
8
use
Magento\Downloadable\Model\ResourceModel\Link\Purchased\Item
as
Resource
;
9
47
class
Item
extends
\Magento\Framework\Model\AbstractModel
48
{
49
const
XML_PATH_ORDER_ITEM_STATUS
=
'catalog/downloadable/order_item_status'
;
50
51
const
LINK_STATUS_PENDING
=
'pending'
;
52
53
const
LINK_STATUS_AVAILABLE
=
'available'
;
54
55
const
LINK_STATUS_EXPIRED
=
'expired'
;
56
57
const
LINK_STATUS_PENDING_PAYMENT
=
'pending_payment'
;
58
59
const
LINK_STATUS_PAYMENT_REVIEW
=
'payment_review'
;
60
66
protected
function
_construct
()
67
{
68
$this->
_init
(\
Magento
\Downloadable\Model\
ResourceModel
\
Link
\
Purchased
\Item::class);
69
parent::_construct();
70
}
71
78
public
function
beforeSave
()
79
{
80
if
(
null
== $this->getOrderItemId()) {
81
throw
new \Exception(
__
(
'Order item id cannot be null'
));
82
}
83
return
parent::beforeSave();
84
}
85
}
Magento\Framework\Model\AbstractModel
Definition:
AbstractModel.php:19
Magento\Downloadable\Model\Link\Purchased\Item\XML_PATH_ORDER_ITEM_STATUS
const XML_PATH_ORDER_ITEM_STATUS
Definition:
Item.php:49
Magento\Catalog\Model\ResourceModel\Product
Definition:
CollectionTest.php:6
Magento\Downloadable\Model\Link\Purchased\Item
Definition:
Item.php:47
Magento\Downloadable\Model\ResourceModel\Link
Definition:
Collection.php:6
Magento\Downloadable\Model\Link\Purchased
Definition:
Item.php:6
__
__()
Definition:
__.php:13
Magento\Downloadable\Model\Link\Purchased\Item\LINK_STATUS_PAYMENT_REVIEW
const LINK_STATUS_PAYMENT_REVIEW
Definition:
Item.php:59
Magento\Downloadable\Model\Link\Purchased\Item\LINK_STATUS_PENDING_PAYMENT
const LINK_STATUS_PENDING_PAYMENT
Definition:
Item.php:57
Magento\Downloadable\Model\ResourceModel\Link\Purchased\Item
Definition:
Collection.php:6
Magento\Downloadable\Model\Link\Purchased\Item\LINK_STATUS_AVAILABLE
const LINK_STATUS_AVAILABLE
Definition:
Item.php:53
Magento\Downloadable\Model\Link\Purchased\Item\beforeSave
beforeSave()
Definition:
Item.php:78
Magento\Downloadable\Model\Link
Definition:
Link.php:21
Magento
Magento\Downloadable\Model\Link\Purchased\Item\LINK_STATUS_PENDING
const LINK_STATUS_PENDING
Definition:
Item.php:51
Magento\Downloadable\Model\Link\Purchased\Item\_construct
_construct()
Definition:
Item.php:66
Magento\Downloadable\Model\Link\Purchased
Definition:
Purchased.php:34
Magento\Downloadable\Model\Link\Purchased\Item\LINK_STATUS_EXPIRED
const LINK_STATUS_EXPIRED
Definition:
Item.php:55
Magento\Framework\Model\AbstractModel\_init
_init($resourceModel)
Definition:
AbstractModel.php:213