Renderer represents navigation by tabs. It inherits from Jet\UI_Renderer_Single.

Each tab is represented by its own Jet\UI_tabs_tab renderer.

Each tab must have its own ID and title. It is also necessary to specify a creator - a function that generates a URL to which the tab will be directed based on the tab ID.

Overview of methods

Method Meaning of
public __construct(
array $tabs,
callable $tab_url_creator,
?string $selected_tab_id=null
  • $tabs
    Tab list in the form of an associated array, where the key is the ID and the value is the title of the tab.
  • $tab_url_creator
    A function that creates a URL based on the tab ID. The prototype function is: function( string $tab_id ) : string {
  • $selected_tab_id
    The ID of the active tab. If not specified, then the first tab is selected.
public getTab(
string $id
) : UI_tabs_tab
Returns an instance of a specific tab based on the ID.
public getTabs(
) : UI_tabs_tab[]
Returns a list of all bookmarks.
public getSelectedTabId(
) : string
Returns the ID of the active tab.
Previous chapter
Next chapter