'; foreach ($tabs as $tab) { $html[] = static::getTab($tab, $tabs); } $html[] = ''; return implode('', $html); } /** * Method to generate the side bar. * * @return string Markup for the side bar. * * @since 3.1 */ public static function stepbarlanguages() { $tabs = array(); $tabs[] = 'languages'; $tabs[] = 'defaultlanguage'; $tabs[] = 'complete'; $html = array(); $html[] = ''; return implode('', $html); } /** * Method to generate the navigation tab. * * @param string $id The container ID. * @param array $tabs The navigation tabs. * * @return string Markup for the tab. * * @since 3.1 */ private static function getTab($id, $tabs) { $input = JFactory::getApplication()->input; $num = static::getTabNumber($id, $tabs); $view = static::getTabNumber($input->getWord('view'), $tabs); $tab = '' . $num . ' ' . JText::_('INSTL_STEP_' . strtoupper($id) . '_LABEL'); if ($view + 1 === $num) { $tab = '' . $tab . ''; } elseif ($view < $num) { $tab = '' . $tab . ''; } else { $tab = '' . $tab . ''; } return '
  • ' . $tab . '
  • '; } /** * Method to determine the tab (step) number. * * @param string $id The container ID. * @param array $tabs The navigation tabs. * * @return integer Tab number in navigation sequence. * * @since 3.1 */ private static function getTabNumber($id, $tabs) { $num = (int) array_search($id, $tabs, true); $num++; return $num; } }