Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
accordion.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <?php
14 $items = $block->getItems();
15 ?>
16 <?php if (!empty($items)): ?>
17  <dl id="tab_content_<?= $block->getHtmlId() ?>" name="tab_content_<?= $block->getHtmlId() ?>" class="accordion">
18  <?php foreach ($items as $_item): ?>
19  <?= $block->getChildHtml($_item->getId()) ?>
20  <?php endforeach ?>
21  </dl>
22  <script>
23  require([
24  'mage/adminhtml/accordion'
25  ], function(){
26  tab_content_<?= $block->getHtmlId() ?>AccordionJs = new varienAccordion('tab_content_<?= $block->getHtmlId() ?>', '<?= /* @escapeNotVerified */ $block->getShowOnlyOne() ?>');
27  });
28  </script>
29 <?php endif; ?>
if(!empty( $items))() ?>" name endforeach endif
Definition: accordion.phtml:26
foreach( $this->main as $item) endforeach
Definition: side-menu.phtml:10
$block
Definition: block.php:8
$_item
Definition: default.phtml:11
$items
Definition: accordion.phtml:14