0 follower

Final Class Yiisoft\Yii\Bulma\NavBar

InheritanceYiisoft\Yii\Bulma\NavBar » Yiisoft\Widget\Widget

NavBar renders a navbar HTML component.

Any content enclosed between the {@see \Yiisoft\Yii\Bulma\begin()} and {@see \Yiisoft\Yii\Bulma\end()} calls of NavBar is treated as the content of the navbar. You may use widgets such as {@see \Yiisoft\Yii\Bulma\Nav} to build up such content. For example,

Public Methods

Hide inherited methods

Method Description Defined By
ariaLabel() Returns a new instance with the specified aria-label attribute for the current element. Yiisoft\Yii\Bulma\NavBar
attributes() Returns a new instance with the specified HTML attributes for widget. Yiisoft\Yii\Bulma\NavBar
autoIdPrefix() Returns a new instance with the specified prefix to the automatically generated widget IDs. Yiisoft\Yii\Bulma\NavBar
begin() Yiisoft\Yii\Bulma\NavBar
brandAttributes() Returns a new instance with the specified HTML attributes for the navbar brand. Yiisoft\Yii\Bulma\NavBar
brandCssClass() Returns a new instance with the specified the CSS class of the brand. Yiisoft\Yii\Bulma\NavBar
brandImage() Returns a new instance with the specified src of the brand image, empty if it's not used. Yiisoft\Yii\Bulma\NavBar
brandImageAttributes() Returns a new instance with the specified HTML attributes for the brand image. Yiisoft\Yii\Bulma\NavBar
brandText() Returns a new instance with the specified the text of the brand or empty if it's not used. Note that this is not HTML-encoded. Yiisoft\Yii\Bulma\NavBar
brandTextAttributes() Returns a new instance with the specified HTML attributes for the brand text. Yiisoft\Yii\Bulma\NavBar
brandUrl() Returns a new instance with the specified the URL for the brand's hyperlink tag and will be used for the "href" attribute of the brand link. Default value is "/". You may set it to empty string if you want no link at all. Yiisoft\Yii\Bulma\NavBar
burgerAttributes() Returns a new instance with the specified HTML attributes for the burger. Yiisoft\Yii\Bulma\NavBar
burgerCssClass() Returns a new instance with the specified the CSS class of the burger. Yiisoft\Yii\Bulma\NavBar
buttonLinkAriaExpanded() Returns a new instance with the specified the ARIA expanded attribute of the button link. Yiisoft\Yii\Bulma\NavBar
buttonLinkAriaLabelText() Returns a new instance with the specified HTML attributes for the ARIA label text of the button link. Yiisoft\Yii\Bulma\NavBar
buttonLinkContent() Returns a new instance with the specified the content of the button link. Yiisoft\Yii\Bulma\NavBar
buttonLinkRole() Returns a new instance with the specified the role of the button link. Yiisoft\Yii\Bulma\NavBar
cssClass() Returns a new instance with the specified the CSS class of the navbar. Yiisoft\Yii\Bulma\NavBar
id() Returns a new instance with the specified ID of the widget. Yiisoft\Yii\Bulma\NavBar
itemCssClass() Returns a new instance with the specified the CSS class of the items navbar. Yiisoft\Yii\Bulma\NavBar
render() Yiisoft\Yii\Bulma\NavBar
role() Returns a new instance with the specified the role of the navbar. Yiisoft\Yii\Bulma\NavBar

Method Details

Hide inherited methods

ariaLabel() public method

Returns a new instance with the specified aria-label attribute for the current element.

public self ariaLabel ( string $value )
$value string

                public function ariaLabel(string $value): self
{
    $new = clone $this;
    $new->ariaLabel = $value;
    return $new;
}

            
attributes() public method

Returns a new instance with the specified HTML attributes for widget.

public self attributes ( array $values )
$values array

Attribute values indexed by attribute names.

{@see \Yiisoft\Html\Html::renderTagAttributes()} For details on how attributes are being rendered.

                public function attributes(array $values): self
{
    $new = clone $this;
    $new->attributes = $values;
    return $new;
}

            
autoIdPrefix() public method

Returns a new instance with the specified prefix to the automatically generated widget IDs.

public self autoIdPrefix ( string $value )
$value string

The prefix to the automatically generated widget IDs.

                public function autoIdPrefix(string $value): self
{
    $new = clone $this;
    $new->autoIdPrefix = $value;
    return $new;
}

            
begin() public method

public string begin ( )

                public function begin(): string
{
    parent::begin();
    return $this->renderNavBar();
}

            
brandAttributes() public method

Returns a new instance with the specified HTML attributes for the navbar brand.

public self brandAttributes ( array $values )
$values array

Attribute values indexed by attribute names.

{@see \Yiisoft\Html\Html::renderTagAttributes()} For details on how attributes are being rendered.

                public function brandAttributes(array $values): self
{
    $new = clone $this;
    $new->brandAttributes = $values;
    return $new;
}

            
brandCssClass() public method

Returns a new instance with the specified the CSS class of the brand.

public self brandCssClass ( string $value )
$value string

The CSS class.

                public function brandCssClass(string $value): self
{
    $new = clone $this;
    $new->brandCssClass = $value;
    return $new;
}

            
brandImage() public method

Returns a new instance with the specified src of the brand image, empty if it's not used.

Note that this param will override $this->brandText param.

public self brandImage ( string $value )
$value string

The src of the brand image.

                public function brandImage(string $value): self
{
    $new = clone $this;
    $new->brandImage = $value;
    return $new;
}

            
brandImageAttributes() public method

Returns a new instance with the specified HTML attributes for the brand image.

public self brandImageAttributes ( array $values )
$values array

Attribute values indexed by attribute names.

{@see \Yiisoft\Html\Html::renderTagAttributes()} For details on how attributes are being rendered.

                public function brandImageAttributes(array $values): self
{
    $new = clone $this;
    $new->brandImageAttributes = $values;
    return $new;
}

            
brandText() public method

Returns a new instance with the specified the text of the brand or empty if it's not used. Note that this is not HTML-encoded.

public self brandText ( string $value )
$value string

The text of the brand.

                public function brandText(string $value): self
{
    $new = clone $this;
    $new->brandText = $value;
    return $new;
}

            
brandTextAttributes() public method

Returns a new instance with the specified HTML attributes for the brand text.

public self brandTextAttributes ( array $values )
$values array

Attribute values indexed by attribute names.

{@see \Yiisoft\Html\Html::renderTagAttributes()} For details on how attributes are being rendered.

                public function brandTextAttributes(array $values): self
{
    $new = clone $this;
    $new->brandTextAttributes = $values;
    return $new;
}

            
brandUrl() public method

Returns a new instance with the specified the URL for the brand's hyperlink tag and will be used for the "href" attribute of the brand link. Default value is "/". You may set it to empty string if you want no link at all.

public self brandUrl ( string $value )
$value string

                public function brandUrl(string $value): self
{
    $new = clone $this;
    $new->brandUrl = $value;
    return $new;
}

            
burgerAttributes() public method

Returns a new instance with the specified HTML attributes for the burger.

public self burgerAttributes ( array $values )
$values array

Attribute values indexed by attribute names.

{@see \Yiisoft\Html\Html::renderTagAttributes()} For details on how attributes are being rendered.

                public function burgerAttributes(array $values): self
{
    $new = clone $this;
    $new->burgerAttributes = $values;
    return $new;
}

            
burgerCssClass() public method

Returns a new instance with the specified the CSS class of the burger.

public self burgerCssClass ( string $value )
$value string

The CSS class.

                public function burgerCssClass(string $value): self
{
    $new = clone $this;
    $new->burgerCssClass = $value;
    return $new;
}

            
buttonLinkAriaExpanded() public method

Returns a new instance with the specified the ARIA expanded attribute of the button link.

public self buttonLinkAriaExpanded ( string $value )
$value string

                public function buttonLinkAriaExpanded(string $value): self
{
    $new = clone $this;
    $new->buttonLinkAriaExpanded = $value;
    return $new;
}

            
buttonLinkAriaLabelText() public method

Returns a new instance with the specified HTML attributes for the ARIA label text of the button link.

public self buttonLinkAriaLabelText ( string $value )
$value string

                public function buttonLinkAriaLabelText(string $value): self
{
    $new = clone $this;
    $new->buttonLinkAriaLabelText = $value;
    return $new;
}

            
buttonLinkContent() public method

Returns a new instance with the specified the content of the button link.

public self buttonLinkContent ( string $value )
$value string

                public function buttonLinkContent(string $value): self
{
    $new = clone $this;
    $new->buttonLinkContent = $value;
    return $new;
}

            
buttonLinkRole() public method

Returns a new instance with the specified the role of the button link.

public self buttonLinkRole ( string $value )
$value string

                public function buttonLinkRole(string $value): self
{
    $new = clone $this;
    $new->buttonLinkRole = $value;
    return $new;
}

            
cssClass() public method

Returns a new instance with the specified the CSS class of the navbar.

public self cssClass ( string $value )
$value string

The CSS class.

                public function cssClass(string $value): self
{
    $new = clone $this;
    $new->cssClass = $value;
    return $new;
}

            
id() public method

Returns a new instance with the specified ID of the widget.

public self id ( string $value )
$value string

The ID of the widget.

                public function id(string $value): self
{
    $new = clone $this;
    $new->attributes['id'] = $value;
    return $new;
}

            
itemCssClass() public method

Returns a new instance with the specified the CSS class of the items navbar.

public self itemCssClass ( string $value )
$value string

The CSS class.

                public function itemCssClass(string $value): self
{
    $new = clone $this;
    $new->itemCssClass = $value;
    return $new;
}

            
render() public method

public string render ( )

                public function render(): string
{
    return Html::closeTag('nav');
}

            
role() public method

Returns a new instance with the specified the role of the navbar.

public self role ( string $value )
$value string

                public function role(string $value): self
{
    $new = clone $this;
    $new->role = $value;
    return $new;
}