/** * Adds header tag options * @param array $options given options */ private static function _headerOptions($options) { Html::addCssClass($options, 'page-header navbar'); if (Metronic::HEADER_FIXED === Metronic::getComponent()->headerOption) { Html::addCssClass($options, 'navbar-fixed-top'); } else { Html::addCssClass($options, 'navbar-static-top'); } return $options; }
/** * Renders a widget's item. * @param string|array $item the item to render. * @return string the rendering result. * @throws InvalidConfigException */ public function renderItem($item) { if (is_string($item)) { return $item; } if (!isset($item['label']) && !isset($item['icon'])) { throw new InvalidConfigException("The 'label' option is required."); } $type = ArrayHelper::getValue($item, 'type', self::TYPE_DEFAULT); $options = ArrayHelper::getValue($item, 'options', []); Html::addCssClass($options, 'dropdown'); if ($type !== self::TYPE_DEFAULT) { if ($type !== self::TYPE_USER) { Html::addCssClass($options, 'dropdown-extended'); } Html::addCssClass($options, 'dropdown-' . $type); if (Metronic::HEADER_DROPDOWN_DARK === Metronic::getComponent()->headerDropdown) { Html::addCssClass($options, 'dropdown-dark'); } } if (isset($item['active'])) { $active = ArrayHelper::remove($item, 'active', false); } else { $active = $this->isItemActive($item); } if ($active) { Html::addCssClass($options, 'active'); } return Html::tag('li', sprintf('%s%s', $this->_getLinkTag($item), $this->_getDropdownTag($item)), $options); }
/** * Handles style based files */ private function _handleStyleBased() { $this->css = ArrayHelper::merge($this->styleBasedCss[Metronic::getComponent()->style], $this->css); }
<!-- END PAGE CONTENT--> </div> </div> <!-- END CONTENT --> </div> <!-- END CONTAINER --> <!-- BEGIN FOOTER --> <div class="footer"> <div class="footer-inner"> <?php echo date('Y'); ?> © YiiMetronic. </div> <div class="footer-tools"> <span class="go-top"> <i class="fa fa-angle-up"></i> </span> </div> </div> <?php echo Metronic::getComponent()->layoutOption == Metronic::LAYOUT_BOXED ? Html::endTag('div') : ''; ?> <?php $this->endBody(); ?> </body> <!-- END BODY --> </html> <?php $this->endPage();
/** * Parses dynamic css */ private function _handleDynamicCss() { array_walk($this->css, array(Metronic::getComponent(), 'parseAssetsParams')); }
/** * Inits options */ private function _initOptions() { Html::addCssClass($this->options, 'page-sidebar-menu'); if (Metronic::SIDEBAR_MENU_HOVER === Metronic::getComponent()->sidebarMenu) { Html::addCssClass($this->options, 'page-sidebar-menu-hover-submenu'); } $this->options['data-slide-speed'] = 200; $this->options['data-auto-scroll'] = 'true'; $this->options['data-keep-expanded'] = 'false'; $this->options['data-height'] = 261; }