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
Helper
Data.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Downloadable\Helper
;
7
8
use
Magento\Downloadable\Model\Link\Purchased\Item
;
9
15
class
Data
extends
\Magento\Framework\App\Helper\AbstractHelper
16
{
24
public
function
getIsShareable
(
$link
)
25
{
26
$shareable =
false
;
27
switch
(
$link
->getIsShareable()) {
28
case \Magento\Downloadable\Model\Link::LINK_SHAREABLE_YES:
29
case \Magento\Downloadable\Model\Link::LINK_SHAREABLE_NO:
30
$shareable = (bool)
$link
->getIsShareable();
31
break
;
32
case \Magento\Downloadable\Model\Link::LINK_SHAREABLE_CONFIG:
33
$shareable = (bool)$this->scopeConfig->isSetFlag(
34
\
Magento
\Downloadable\Model\Link::XML_PATH_CONFIG_IS_SHAREABLE,
35
\
Magento
\Store\Model\ScopeInterface::SCOPE_STORE
36
);
37
}
38
return
$shareable;
39
}
40
}
Magento\Downloadable\Model\Link\Purchased\Item
Definition:
Item.php:47
$link
$link
Definition:
quote_with_downloadable_product.php:27
Magento\Downloadable\Helper\Data\getIsShareable
getIsShareable($link)
Definition:
Data.php:24
Magento
Magento\Downloadable\Helper
Magento\Framework\App\Helper\AbstractHelper
Definition:
AbstractHelper.php:13
Magento\Downloadable\Helper\Data
Definition:
Data.php:15