PHP 클래스 yii\bootstrap\NavBar

Any content enclosed between the [[begin()]] and [[end()]] calls of NavBar is treated as the content of the navbar. You may use widgets such as Nav or Menu to build up such content. For example, php use yii\bootstrap\NavBar; use yii\bootstrap\Nav; NavBar::begin(['brandLabel' => 'NavBar Test']); echo Nav::widget([ 'items' => [ ['label' => 'Home', 'url' => ['/site/index']], ['label' => 'About', 'url' => ['/site/about']], ], 'options' => ['class' => 'navbar-nav'], ]); NavBar::end();
또한 보기: http://getbootstrap.com/components/#navbar
부터: 2.0
저자: Antonio Ramirez ([email protected])
저자: Alexander Kochetov ([email protected])
상속: extends yii\bootstrap\Widget
파일 보기 프로젝트 열기: yiisoft/yii2-bootstrap 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$brandLabel the text of the brand or false if it's not used. Note that this is not HTML-encoded.
$brandOptions the HTML attributes of the brand link.
$brandUrl array | string | boolean
$containerOptions the HTML attributes for the container tag. The following special options are recognized: - tag: string, defaults to "div", the name of the container tag.
$innerContainerOptions the HTML attributes of the inner container.
$options the HTML attributes for the widget container tag. The following special options are recognized: - tag: string, defaults to "nav", the name of the container tag.
$renderInnerContainer whether the navbar content should be included in an inner div container which by default adds left and right padding. Set this to false for a 100% width navbar.
$screenReaderToggleText text to show for screen readers for the button to toggle the navbar.

공개 메소드들

메소드 설명
init ( ) Initializes the widget.
run ( ) Renders the widget.

보호된 메소드들

메소드 설명
renderToggleButton ( ) : string Renders collapsible toggle button.

메소드 상세

init() 공개 메소드

Initializes the widget.
public init ( )

renderToggleButton() 보호된 메소드

Renders collapsible toggle button.
protected renderToggleButton ( ) : string
리턴 string the rendering toggle button.

run() 공개 메소드

Renders the widget.
public run ( )

프로퍼티 상세

$brandLabel 공개적으로 프로퍼티

the text of the brand or false if it's not used. Note that this is not HTML-encoded.
또한 보기: http://getbootstrap.com/components/#navbar
public $brandLabel

$brandOptions 공개적으로 프로퍼티

the HTML attributes of the brand link.
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $brandOptions

$brandUrl 공개적으로 프로퍼티

public array|string|bool $brandUrl
리턴 array | string | boolean

$containerOptions 공개적으로 프로퍼티

the HTML attributes for the container tag. The following special options are recognized: - tag: string, defaults to "div", the name of the container tag.
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $containerOptions

$innerContainerOptions 공개적으로 프로퍼티

the HTML attributes of the inner container.
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $innerContainerOptions

$options 공개적으로 프로퍼티

the HTML attributes for the widget container tag. The following special options are recognized: - tag: string, defaults to "nav", the name of the container tag.
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $options

$renderInnerContainer 공개적으로 프로퍼티

whether the navbar content should be included in an inner div container which by default adds left and right padding. Set this to false for a 100% width navbar.
public $renderInnerContainer

$screenReaderToggleText 공개적으로 프로퍼티

text to show for screen readers for the button to toggle the navbar.
public $screenReaderToggleText