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-catalog
Model
Product
Attribute
Frontend
Inputtype
Presentation.php
Go to the documentation of this file.
1
<?php
7
declare(strict_types=1);
8
9
namespace
Magento\Catalog\Model\Product\Attribute\Frontend\Inputtype
;
10
11
use
Magento\Catalog\Model\ResourceModel\Eav\Attribute
;
12
18
class
Presentation
19
{
26
public
function
getPresentationInputType
(
Attribute
$attribute
) :?string
27
{
28
$inputType =
$attribute
->getFrontendInput();
29
if
($inputType ==
'textarea'
&&
$attribute
->getIsWysiwygEnabled()) {
30
return
'texteditor'
;
31
}
32
return
$inputType;
33
}
34
42
public
function
convertPresentationDataToInputType
(array
$data
) : array
43
{
44
if
(isset(
$data
[
'frontend_input'
]) &&
$data
[
'frontend_input'
] ===
'texteditor'
) {
45
$data
[
'is_wysiwyg_enabled'
] = 1;
46
$data
[
'frontend_input'
] =
'textarea'
;
47
}
elseif
(isset(
$data
[
'frontend_input'
]) &&
$data
[
'frontend_input'
] ===
'textarea'
) {
48
$data
[
'is_wysiwyg_enabled'
] = 0;
49
}
50
return
$data
;
51
}
52
}
elseif
elseif(isset( $params[ 'redirect_parent']))
Definition:
iframe.phtml:17
$attribute
$attribute
Definition:
attribute_set_with_image_attribute.php:41
Magento\Catalog\Model\Product\Attribute\Frontend\Inputtype\Presentation\convertPresentationDataToInputType
convertPresentationDataToInputType(array $data)
Definition:
Presentation.php:42
Magento\Catalog\Model\Product\Attribute\Frontend\Inputtype\Presentation\getPresentationInputType
getPresentationInputType(Attribute $attribute)
Definition:
Presentation.php:26
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Catalog\Model\ResourceModel\Eav\Attribute
Definition:
Attribute.php:31
Magento\Catalog\Model\Product\Attribute\Frontend\Inputtype
Definition:
Presentation.php:9
Magento\Catalog\Model\Product\Attribute\Frontend\Inputtype\Presentation
Definition:
Presentation.php:18