File tree 2 files changed +32
-0
lines changed
2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Swissup \Easytabs \Block \Tab ;
4
+
5
+ use Magento \Framework \View \Element \BlockInterface ;
6
+ use Magento \Framework \View \Element \Text \ListText ;
7
+
8
+ class LayoutXmlReference extends ListText implements BlockInterface
9
+ {
10
+ public function setTemplate ($ childNames )
11
+ {
12
+ $ names = explode (', ' , $ childNames );
13
+
14
+ foreach ($ names as $ i => $ name ) {
15
+ if ($ child = $ this ->getLayout ()->getBlock ($ name )) {
16
+ $ this ->setChild ('easytab.xml. ' . $ i , $ child );
17
+ }
18
+ }
19
+
20
+ return $ this ;
21
+ }
22
+ }
Original file line number Diff line number Diff line change 176
176
</parameter >
177
177
</parameters >
178
178
</widget >
179
+ <widget id =" easytabs_xml_reference" class =" Swissup\Easytabs\Block\Tab\LayoutXmlReference" is_email_compatible =" false"
180
+ placeholder_image =" " ttl =" 86400" >
181
+ <label translate =" true" >Reference to the Layout XML Block</label >
182
+ <description >Move existing layout XML block to the tab</description >
183
+ <parameters >
184
+ <parameter name =" widget_template" xsi : type =" text" required =" true" visible =" true" >
185
+ <label translate =" true" >Block name in Layout XML</label >
186
+ </parameter >
187
+ </parameters >
188
+ </widget >
179
189
<widget id =" easytabs_cms" class =" Swissup\Easytabs\Block\Tab\Cms" is_email_compatible =" false"
180
190
placeholder_image =" " ttl =" 86400" >
181
191
<label translate =" true" >CMS Static Block</label >
You can’t perform that action at this time.
0 commit comments