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
Product
TypeHandler
TypeHandler.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Downloadable\Model\Product\TypeHandler
;
7
8
use
Magento\Catalog\Model\Product
;
9
13
class
TypeHandler
implements
TypeHandlerInterface
14
{
15
19
private
$handlers;
20
24
public
function
__construct
(array $handlers)
25
{
26
$this->handlers = $handlers;
27
}
28
32
public
function
save
(
Product
$product
, array
$data
)
33
{
34
foreach
($this->handlers as
$handler
) {
35
$handler
->save(
$product
,
$data
);
36
}
37
}
38
42
public
function
isCanHandle
(array
$data
)
43
{
44
$result
=
false
;
45
foreach
($this->handlers as
$handler
) {
46
if
(
$handler
->isCanHandle(
$data
)) {
47
$result
=
true
;
48
break
;
49
}
50
}
51
return
$result
;
52
}
53
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Downloadable\Model\Product\TypeHandler\TypeHandler\isCanHandle
isCanHandle(array $data)
Definition:
TypeHandler.php:42
Magento\Downloadable\Model\Product\TypeHandler\TypeHandlerInterface
Definition:
TypeHandlerInterface.php:15
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Catalog\Model\Product
Definition:
Product.php:42
Magento\Catalog\Model\Product
Definition:
ActionTest.php:6
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\Downloadable\Model\Product\TypeHandler\TypeHandler
Definition:
TypeHandler.php:13
Magento\Downloadable\Model\Product\TypeHandler\TypeHandler\save
save(Product $product, array $data)
Definition:
TypeHandler.php:32
Magento\Downloadable\Model\Product\TypeHandler\TypeHandler\__construct
__construct(array $handlers)
Definition:
TypeHandler.php:24
Magento\Downloadable\Model\Product\TypeHandler
Definition:
AbstractTypeHandler.php:7
$handler
catch(\Exception $e) $handler
Definition:
index.php:30