Ejemplo n.º 1
0
 public function onBeforeDispatch()
 {
     // Load Akeeba Strapper, if it is installed
     \JLoader::import('joomla.filesystem.folder');
     $useStrapper = ComponentParams::getParam('usestrapper', 3);
     if (in_array($useStrapper, [1, 3]) && \JFolder::exists(JPATH_SITE . '/media/strapper30')) {
         @(include_once JPATH_SITE . '/media/strapper30/strapper.php');
         if (class_exists('\\AkeebaStrapper30', false)) {
             \AkeebaStrapper30::bootstrap();
         }
     }
     // Map the view
     $this->applyViewMap();
     // Load common CSS and JavaScript
     \JHtml::_('jquery.framework');
     $this->container->template->addCSS('media://com_akeebasubs/css/frontend.css', $this->container->mediaVersion);
 }
Ejemplo n.º 2
0
 public function onBeforeDispatch()
 {
     // Load Akeeba Strapper, if it is installed
     \JLoader::import('joomla.filesystem.folder');
     $useStrapper = ComponentParams::getParam('usestrapper', 3);
     if (in_array($useStrapper, [2, 3]) && \JFolder::exists(JPATH_SITE . '/media/strapper30')) {
         @(include_once JPATH_SITE . '/media/strapper30/strapper.php');
         if (class_exists('\\AkeebaStrapper30', false)) {
             \AkeebaStrapper30::bootstrap();
         }
     }
     // Render submenus as drop-down navigation bars powered by Bootstrap
     $this->container->renderer->setOption('linkbar_style', 'classic');
     // Load common CSS and JavaScript
     \JHtml::_('jquery.framework');
     $this->container->template->addCSS('media://com_akeebasubs/css/backend.css', $this->container->mediaVersion);
     $this->container->template->addJS('media://com_akeebasubs/js/backend.js', false, false, $this->container->mediaVersion);
 }