芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/chocholayucatan.gob.mx/libraries/src/HTML/Helpers/UiTab.php
* @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\HTML\Helpers; \defined('JPATH_PLATFORM') or die; use Joomla\CMS\Factory; /** * Utility class for the Joomla core UI Tab element. * * @since 4.0.0 */ abstract class UiTab { /** * @var array Array containing information for loaded files * @since 4.0.0 */ protected static $loaded = array(); /** * Creates a core UI tab pane * * @param string $selector The pane identifier. * @param array $params The parameters for the pane * * @return string * * @since 4.0.0 */ public static function startTabSet($selector = 'myTab', $params = array()) { $sig = md5(serialize(array($selector, $params))); if (!isset(static::$loaded[__METHOD__][$sig])) { // Include the custom element Factory::getDocument()->getWebAssetManager() ->useStyle('webcomponent.joomla-tab') ->useScript('webcomponent.joomla-tab'); // Setup options object $opt['active'] = (isset($params['active']) && ($params['active'])) ? (string) $params['active'] : ''; // Set static array static::$loaded[__METHOD__][$sig] = true; static::$loaded[__METHOD__][$selector]['active'] = $opt['active']; } $orientation = isset($params['orientation']) ? $params['orientation'] : 'horizontal'; $recall = isset($params['recall']) ? 'recall' : ''; $breakpoint = isset($params['breakpoint']) ? 'breakpoint="' . $params['breakpoint'] . '"' : ''; if (!isset($params['breakpoint']) && $breakpoint === '') { $breakpoint = 'breakpoint="768"'; } return '
'; } /** * Close the current tab pane * * @return string HTML to close the pane * * @since 4.0.0 */ public static function endTabSet() { return '
'; } /** * 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 '
'; } /** * Close the current tab content panel * * @return string HTML to close the pane * * @since 4.0.0 */ public static function endTab() { return '
'; } }