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-product-video
Model
Plugin
Catalog
Product
Gallery
AbstractHandler.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\ProductVideo\Model\Plugin\Catalog\Product\Gallery
;
7
11
abstract
class
AbstractHandler
12
{
16
protected
$videoPropertiesDbMapping
= [
17
'value_id'
=>
'value_id'
,
18
'store_id'
=>
'store_id'
,
19
'video_provider'
=>
'provider'
,
20
'video_url'
=>
'url'
,
21
'video_title'
=>
'title'
,
22
'video_description'
=>
'description'
,
23
'video_metadata'
=>
'metadata'
24
];
25
29
protected
$resourceModel
;
30
34
public
function
__construct
(
35
\
Magento
\Catalog\Model\
ResourceModel
\Product\
Gallery
$resourceModel
36
) {
37
$this->resourceModel =
$resourceModel
;
38
}
39
45
protected
function
getMediaEntriesDataCollection
(
46
\
Magento
\Catalog\Model\Product
$product
,
47
\
Magento
\Eav\Model\Entity\Attribute\AbstractAttribute
$attribute
48
) {
49
$attributeCode
=
$attribute
->getAttributeCode();
50
$mediaData =
$product
->getData(
$attributeCode
);
51
if
(!empty($mediaData[
'images'
]) && is_array($mediaData[
'images'
])) {
52
return
$mediaData[
'images'
];
53
}
54
return
[];
55
}
56
}
Magento\Catalog\Model\ResourceModel\Product
Definition:
CollectionTest.php:6
Magento\ProductVideo\Model\Plugin\Catalog\Product\Gallery\AbstractHandler\__construct
__construct(\Magento\Catalog\Model\ResourceModel\Product\Gallery $resourceModel)
Definition:
AbstractHandler.php:34
Magento\ProductVideo\Model\Plugin\Catalog\Product\Gallery
Definition:
AbstractHandler.php:6
$attribute
$attribute
Definition:
attribute_set_with_image_attribute.php:41
Magento\ProductVideo\Model\Plugin\Catalog\Product\Gallery\AbstractHandler\$videoPropertiesDbMapping
$videoPropertiesDbMapping
Definition:
AbstractHandler.php:16
Magento\Catalog\Model\ResourceModel\Product\Gallery
Definition:
Gallery.php:16
Magento\ProductVideo\Model\Plugin\Catalog\Product\Gallery\AbstractHandler
Definition:
AbstractHandler.php:11
Magento\ProductVideo\Model\Plugin\Catalog\Product\Gallery\AbstractHandler\getMediaEntriesDataCollection
getMediaEntriesDataCollection(\Magento\Catalog\Model\Product $product, \Magento\Eav\Model\Entity\Attribute\AbstractAttribute $attribute)
Definition:
AbstractHandler.php:45
$attributeCode
$attributeCode
Definition:
extend.phtml:12
Magento\ProductVideo\Model\Plugin\Catalog\Product\Gallery\AbstractHandler\$resourceModel
$resourceModel
Definition:
AbstractHandler.php:29
Magento
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22