Navbar
extends NavTag
in package
Bootstrap5 NavBar.
Table of Contents
Properties
- $leftContent : UlTag
- Main menu content.
- $mainpage : string
- Brand link destination.
- $rightContent : UlTag
- Položky menu přidávané vpravo.
- $containerFluid : DivTag
- $navBarName : string
Methods
- __construct() : mixed
- App Menu.
- addDropDownMenu() : NavItemDropDown
- Add DropDown menu to nav.
- addMenuItem() : LiTag
- Add new Menu Item into NavBar.
- addSearchForm() : Form
- Search Form for NavBar.
- finalize() : void
- Finalize NavBar.
- navBarCollapse() : DivTag
- NavBar collapse helper.
- navBarToggler() : ButtonTag
- NavBar Toggle.
Properties
$leftContent
Main menu content.
public
UlTag
$leftContent
$mainpage
Brand link destination.
public
string
$mainpage
= '#'
$rightContent
Položky menu přidávané vpravo.
public
UlTag
$rightContent
$containerFluid
private
DivTag
$containerFluid
$navBarName
private
string
$navBarName
= 'nav'
Methods
__construct()
App Menu.
public
__construct([null|mixed $brand = null ][, mixed $name = 'navbar' ][, mixed $properties = [] ]) : mixed
Parameters
- $brand : null|mixed = null
- $name : mixed = 'navbar'
- $properties : mixed = []
addDropDownMenu()
Add DropDown menu to nav.
public
addDropDownMenu(string $label, array<string|int, mixed> $items[, string $placement = 'left' ]) : NavItemDropDown
Parameters
- $label : string
-
SubMenu label
- $items : array<string|int, mixed>
-
['url'=>'label','url2'=>'label2','divider1'=>'',...]
- $placement : string = 'left'
-
"left" is default
Return values
NavItemDropDownaddMenuItem()
Add new Menu Item into NavBar.
public
addMenuItem(mixed $content[, bool $enabled = true ][, string $placement = 'left' ]) : LiTag
Parameters
- $content : mixed
-
to insert in menu
- $enabled : bool = true
-
false give you gray NonClickable menu item
- $placement : string = 'left'
-
"left" is default
Return values
LiTag —MenuItem added
addSearchForm()
Search Form for NavBar.
public
addSearchForm([string $label = 'Search' ][, array<string|int, mixed> $formProperties = [] ]) : Form
Parameters
- $label : string = 'Search'
- $formProperties : array<string|int, mixed> = []
Return values
Formfinalize()
Finalize NavBar.
public
finalize() : void
navBarCollapse()
NavBar collapse helper.
public
navBarCollapse() : DivTag
Return values
DivTag —NavBar collapse
navBarToggler()
NavBar Toggle.
public
navBarToggler() : ButtonTag