Menu

## Tab
in package

Tab.php : 18

Tab class to handle the creation and rendering of tabs.

##### Tags

see
  https://www.kotchasan.com/

### Table of Contents

$datas : array<string|int, mixed>
$id : string
$select : string
$urls : array<string|int, mixed>
__construct() : mixed
  Constructor
add() : mixed
  Add a tab item
getSelect() : string
  Get the ID of the selected tab
render() : string
  Generate the HTML code for rendering the tabs

### Properties

#### $datas

Tab.php : 23
`private array<string|int, mixed> $datas`

Array of tab items

#### $id

Tab.php : 28
`private string $id`

Tab ID (must be unique)

#### $select

Tab.php : 33
`private string $select`

Selected tab ID

#### $urls

Tab.php : 38
`private array<string|int, mixed> $urls`

Array of URL components

### Methods

#### __construct()

Tab.php : 47

Constructor

`public __construct(string $id, string $url[, array<string|int, mixed> $items = [] ]) : mixed`

##### Parameters

$id : string

  Tab ID (must be unique)

$url : string

  URL of the current page (used as the default URL for the menu)

$items : array<string|int, mixed> = []

  Array of initial tab items

##### Return values

mixed —

#### add()

Tab.php : 67

Add a tab item

`public add(string $id, string $title[, string|null $url = '' ][, string|null $target = null ]) : mixed`

##### Parameters

$id : string

  Tab ID (used for selection)

$title : string

  Text of the tab menu

$url : string|null = ''

  URL to be opened when the tab is clicked

$target : string|null = null

  Target attribute for the tab link

##### Return values

mixed —

#### getSelect()

Tab.php : 82

Get the ID of the selected tab

`public getSelect() : string`

##### Return values

string —

#### render()

Tab.php : 94

Generate the HTML code for rendering the tabs

`public render([string $select = '' ]) : string`

##### Parameters

$select : string = ''

  ID of the selected tab (if empty, the first item will be selected)

##### Return values

string —

## Search results