Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Presentation.php
Go to the documentation of this file.
1 <?php
7 declare(strict_types=1);
8 
10 
12 
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(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17