Back to UiTab class

Method addTab

public static string
addTab
(mixed $selector, mixed $id, mixed $title)
Begins the display of a new tab content panel.
Parameters
  • string $selector Identifier of the panel.
  • string $id The ID of the div element
  • string $title The title text for the button
Returns
  • string HTML to start a new panel
Since
  • 4.0.0
Class: UiTab
Project: Joomla

Method addTab - Source code

/**
 * Begins the display of a new tab content panel.
 *
 * @param   string  $selector  Identifier of the panel.
 * @param   string  $id        The ID of the div element
 * @param   string  $title     The title text for the button
 *
 * @return  string  HTML to start a new panel
 *
 * @since   4.0.0
 */
public static function addTab($selector, $id, $title)
{
    $active = static::$loaded[__CLASS__ . '::startTabSet'][$selector]['active'] == $id ? ' active' : '';
    return '<joomla-tab-element id="' . $id . '"' . $active . ' name="' . htmlspecialchars($title, ENT_COMPAT, 'UTF-8') . '">';
}