/** * Echoes any HTML to show before the view template * * @param string $view The current view * @param string $task The current task * @param F0FInput $input The input array (request parameters) * @param array $config The view configuration array * * @return void */ public function preRender($view, $task, $input, $config = array()) { $format = $input->getCmd('format', 'html'); if (empty($format)) { $format = 'html'; } if ($format != 'html') { return; } $platform = F0FPlatform::getInstance(); if ($platform->isCli()) { return; } if ($platform->isBackend()) { // Wrap output in various classes $version = new JVersion(); $versionParts = explode('.', $version->RELEASE); $minorVersion = str_replace('.', '', $version->RELEASE); $majorVersion = array_shift($versionParts); $option = $input->getCmd('option', ''); $view = $input->getCmd('view', ''); $layout = $input->getCmd('layout', ''); $task = $input->getCmd('task', ''); $classes = ' class="' . implode(array('joomla-version-' . $majorVersion, 'joomla-version-' . $minorVersion, 'admin', $option, 'view-' . $view, 'layout-' . $layout, 'task-' . $task), ' ') . '"'; } else { $classes = ''; } echo '<div id="akeeba-renderjoomla"' . $classes . ">\n"; // Render the submenu and toolbar if ($input->getBool('render_toolbar', true)) { $this->renderButtons($view, $task, $input, $config); $this->renderLinkbar($view, $task, $input, $config); } }
/** * Echoes any HTML to show before the view template * * @param string $view The current view * @param string $task The current task * @param F0FInput $input The input array (request parameters) * @param array $config The view configuration array * * @return void */ public function preRender($view, $task, $input, $config = array()) { $format = $input->getCmd('format', 'html'); if (empty($format)) { $format = 'html'; } if ($format != 'html') { return; } $platform = F0FPlatform::getInstance(); if ($platform->isCli()) { return; } if (version_compare(JVERSION, '3.0.0', 'lt')) { JHtml::_('behavior.framework'); } else { if (version_compare(JVERSION, '3.3.0', 'ge')) { JHtml::_('behavior.core'); } else { JHtml::_('behavior.framework', true); } JHtml::_('jquery.framework'); } // Wrap output in various classes $version = new JVersion(); $versionParts = explode('.', $version->RELEASE); $minorVersion = str_replace('.', '', $version->RELEASE); $majorVersion = array_shift($versionParts); if ($platform->isBackend()) { $area = $platform->isBackend() ? 'admin' : 'site'; $option = $input->getCmd('option', ''); $view = $input->getCmd('view', ''); $layout = $input->getCmd('layout', ''); $task = $input->getCmd('task', ''); $classes = array('joomla-version-' . $majorVersion, 'joomla-version-' . $minorVersion, $area, $option, 'view-' . $view, 'layout-' . $layout, 'task-' . $task, 'j-toggle-main', 'j-toggle-transition', 'span12'); } elseif ($platform->isFrontend()) { // @TODO: Remove the frontend Joomla! version classes in FOF 3 $classes = array('joomla-version-' . $majorVersion, 'joomla-version-' . $minorVersion); } // Wrap output in divs echo '<div id="akeeba-bootstrap" class="' . implode($classes, ' ') . "\">\n"; echo "<div class=\"akeeba-bootstrap\">\n"; echo "<div class=\"row-fluid\">\n"; // Render submenu and toolbar (only if asked to) if ($input->getBool('render_toolbar', true)) { $this->renderButtons($view, $task, $input, $config); $this->renderLinkbar($view, $task, $input, $config); } }
/** * Echoes any HTML to show before the view template * * @param string $view The current view * @param string $task The current task * @param F0FInput $input The input array (request parameters) * @param array $config The view configuration array * * @return void */ public function preRender($view, $task, $input, $config = array()) { $format = $input->getCmd('format', 'html'); if (empty($format)) { $format = 'html'; } if ($format != 'html') { return; } $platform = F0FPlatform::getInstance(); if ($platform->isCli()) { return; } // Wrap output in various classes $version = new JVersion(); $versionParts = explode('.', $version->RELEASE); $minorVersion = str_replace('.', '', $version->RELEASE); $majorVersion = array_shift($versionParts); if ($platform->isBackend()) { $area = $platform->isBackend() ? 'admin' : 'site'; $option = $input->getCmd('option', ''); $view = $input->getCmd('view', ''); $layout = $input->getCmd('layout', ''); $task = $input->getCmd('task', ''); $itemid = $input->getCmd('Itemid', ''); $classes = array('joomla-version-' . $majorVersion, 'joomla-version-' . $minorVersion, $area, $option, 'view-' . $view, 'layout-' . $layout, 'task-' . $task, 'itemid-' . $itemid); } elseif ($platform->isFrontend()) { // @TODO: Remove the frontend Joomla! version classes in FOF 3 $classes = array('joomla-version-' . $majorVersion, 'joomla-version-' . $minorVersion); } echo '<div id="akeeba-renderjoomla" class="' . implode($classes, ' ') . "\">\n"; // Render submenu and toolbar (only if asked to) if ($input->getBool('render_toolbar', true)) { $this->renderButtons($view, $task, $input, $config); $this->renderLinkbar($view, $task, $input, $config); } }
/** * Echoes any HTML to show before the view template * * @param string $view The current view * @param string $task The current task * @param F0FInput $input The input array (request parameters) * @param array $config The view configuration array * * @return void */ public function preRender($view, $task, $input, $config = array()) { $format = $input->getCmd('format', 'html'); if (empty($format)) { $format = 'html'; } if ($format != 'html') { return; } // Render the submenu and toolbar if ($input->getBool('render_toolbar', true)) { $this->renderLinkbar($view, $task, $input, $config); $this->renderButtons($view, $task, $input, $config); } }