section name, 'title' => heading or '', 'menu' => Studio menu object] */ public function __construct($oTemplate, $aSections) { $this->_oTemplate = $oTemplate; $this->_aSections = $aSections; } public function getCode() { $aSections = []; foreach($this->_aSections as $aSection) $aSections[] = [ 'name' => $aSection['name'], 'bx_if:title' => [ 'condition' => $aSection['title'] !== '', 'content' => [ 'name' => $aSection['name'], 'title' => $aSection['title'], ], ], 'attrs' => $aSection['title'] !== '' ? 'role="group" aria-labelledby="bx-analytics-std-menu-' . $aSection['name'] . '"' : '', 'menu' => $aSection['menu']->getCode(), ]; return $this->_oTemplate->parseHtmlByName('studio_menu.html', [ 'bx_repeat:sections' => $aSections, ]); } } /** @} */