PHP Class Bootstrap\View\Helper\BootstrapNavbarHelper

Inheritance: extends Cake\View\Helper, use trait BootstrapTrait
Show file Open project: holt59/cakephp3-bootstrap3-helpers

Public Properties

Property Type Description
$autoActiveLink boolean Automatic detection of active link (class="active").
$autoButtonLink boolean Automatic button link when not in a menu.
$helpers

Protected Properties

Property Type Description
$_fixed
$_fluid
$_inverse
$_level integer Menu level (0 = out of menu, 1 = main horizontal menu, 2 = dropdown menu).
$_responsive
$_static

Public Methods

Method Description
addClass ( array $options = [], string | array $class = null, string $key = 'class' ) : array Adds the given class to the element options
beginMenu ( $name = null, $url = null, $options = [], $linkOptions = [], $listOptions = [] ) Start a new menu, 2 levels: If not in submenu, create a dropdown menu, oterwize create hover menu.
button ( $name, array $options = [] ) Add a button to the navbar.
create ( $brand, $options = [] ) Create a new navbar.
divider ( array $options = [] ) Add a divider to the navbar or to a menu.
end ( ) End a navbar.
endMenu ( ) End a menu.
header ( $name, array $options = [] ) Add a header to the navbar or to a menu, should not be used outside a submenu.
link ( $name, $url = '', array $options = [], array $linkOptions = [] ) Add a link to the navbar or to a menu.
searchForm ( $model = null, $options = [] ) Add a serach form to the navbar.
text ( $text, $options = [] ) Add a text to the navbar.

Method Details

addClass() public method

Adds the given class to the element options
public addClass ( array $options = [], string | array $class = null, string $key = 'class' ) : array
$options array Array options/attributes to add a class to
$class string | array The class name being added.
$key string the key to use for class.
return array Array of options with $key set.

beginMenu() public method

Start a new menu, 2 levels: If not in submenu, create a dropdown menu, oterwize create hover menu.
public beginMenu ( $name = null, $url = null, $options = [], $linkOptions = [], $listOptions = [] )

button() public method

Add a button to the navbar.
public button ( $name, array $options = [] )
$options array

create() public method

Create a new navbar.
public create ( $brand, $options = [] )
$brand

divider() public method

Add a divider to the navbar or to a menu.
public divider ( array $options = [] )
$options array

end() public method

End a navbar.
public end ( )

endMenu() public method

End a menu.
public endMenu ( )

header() public method

Add a header to the navbar or to a menu, should not be used outside a submenu.
public header ( $name, array $options = [] )
$options array

searchForm() public method

Add a serach form to the navbar.
public searchForm ( $model = null, $options = [] )

text() public method

Add a text to the navbar.
public text ( $text, $options = [] )

Property Details

$_fixed protected property

protected $_fixed

$_fluid protected property

protected $_fluid

$_inverse protected property

protected $_inverse

$_level protected property

Menu level (0 = out of menu, 1 = main horizontal menu, 2 = dropdown menu).
protected int $_level
return integer

$_responsive protected property

protected $_responsive

$_static protected property

protected $_static

$helpers public property

public $helpers