/**
  * Parses dynamic css
  */
 private function _handleDynamicCss()
 {
     $component = Metronic::getComponent();
     if ($component) {
         array_walk($this->css, [$component, 'parseAssetsParams']);
     }
 }
Example #2
0
 /**
  * Handles style based files
  */
 private function _handleStyleBased()
 {
     if (Metronic::getComponent()) {
         $css = $this->styleBasedCss[Metronic::getComponent()->style];
         $this->css = ArrayHelper::merge($css, $this->css);
     }
 }
 /**
  * Adds header tag options
  * @param array $options given options
  */
 private static function _headerOptions($options)
 {
     Html::addCssClass($options, 'page-header navbar');
     if (Metronic::getComponent() && Metronic::HEADER_FIXED === Metronic::getComponent()->headerOption) {
         Html::addCssClass($options, 'navbar-fixed-top');
     } else {
         Html::addCssClass($options, 'navbar-static-top');
     }
     return $options;
 }
                    <!-- END PAGE CONTENT-->
                </div>
            </div>
            <!-- END CONTENT -->
        </div>
        <!-- END CONTAINER -->
        <!-- BEGIN FOOTER -->
        <div class="footer">
            <div class="footer-inner">
                <?php 
echo date('Y');
?>
 &copy; YiiMetronic.
            </div>
            <div class="footer-tools">
                <span class="go-top">
                    <i class="fa fa-angle-up"></i>
                </span>
            </div>
        </div>
        <?php 
echo Metronic::getComponent() && Metronic::getComponent()->layoutOption == Metronic::LAYOUT_BOXED ? Html::endTag('div') : '';
?>
        <?php 
$this->endBody();
?>
    </body>
    <!-- END BODY -->
</html>
<?php 
$this->endPage();
 /**
  * Inits options
  */
 private function _initOptions()
 {
     Html::addCssClass($this->options, 'page-sidebar-menu');
     if (Metronic::getComponent() && 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;
 }
 /**
  * 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 (in_array(self::ITEM_DIVIDER, $item, true)) {
         return Html::tag('li', '', ['class' => self::ITEM_DIVIDER]);
     }
     $items = ArrayHelper::getValue($item, 'items');
     if ($items === null) {
         return parent::renderItem($item);
     }
     if (!isset($item['label']) && !isset($item['icon'])) {
         throw new InvalidConfigException("The 'label' option is required.");
     }
     $dropdownType = ArrayHelper::getValue($item, 'dropdownType', self::TYPE_DEFAULT);
     $options = ArrayHelper::getValue($item, 'options', []);
     Html::addCssClass($options, 'dropdown');
     if ($dropdownType !== self::TYPE_DEFAULT) {
         if ($dropdownType !== self::TYPE_USER) {
             Html::addCssClass($options, 'dropdown-extended');
         }
         Html::addCssClass($options, 'dropdown-' . $dropdownType);
         if (Metronic::getComponent() && 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);
 }
 /**
  * Parses dynamic css
  */
 private function _handleDynamicCss()
 {
     array_walk($this->css, array(Metronic::getComponent(), 'parseAssetsParams'));
 }