Final Class Yiisoft\Yii\Bulma\NavBar
| Inheritance | Yiisoft\Yii\Bulma\NavBar » Yiisoft\Widget\Widget |
|---|
NavBar renders a navbar HTML component.
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 Yiisoft\Yii\Bulma\Nav to build up such content. For example,
Public 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
Returns a new instance with the specified aria-label attribute for the current element.
| public ariaLabel( string $value ): self | ||
| $value | string | |
public function ariaLabel(string $value): self
{
$new = clone $this;
$new->ariaLabel = $value;
return $new;
}
Returns a new instance with the specified HTML attributes for widget.
| public attributes( array $values ): self | ||
| $values | array |
Attribute values indexed by attribute names. \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;
}
Returns a new instance with the specified prefix to the automatically generated widget IDs.
| public autoIdPrefix( string $value ): self | ||
| $value | string |
The prefix to the automatically generated widget IDs. |
public function autoIdPrefix(string $value): self
{
$new = clone $this;
$new->autoIdPrefix = $value;
return $new;
}
| public begin( ): string |
public function begin(): string
{
parent::begin();
return $this->renderNavBar();
}
Returns a new instance with the specified HTML attributes for the navbar brand.
| public brandAttributes( array $values ): self | ||
| $values | array |
Attribute values indexed by attribute names. \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;
}
Returns a new instance with the specified the CSS class of the brand.
| public brandCssClass( string $value ): self | ||
| $value | string |
The CSS class. |
public function brandCssClass(string $value): self
{
$new = clone $this;
$new->brandCssClass = $value;
return $new;
}
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 brandImage( string $value ): self | ||
| $value | string |
The src of the brand image. |
public function brandImage(string $value): self
{
$new = clone $this;
$new->brandImage = $value;
return $new;
}
Returns a new instance with the specified HTML attributes for the brand image.
| public brandImageAttributes( array $values ): self | ||
| $values | array |
Attribute values indexed by attribute names. \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;
}
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 brandText( string $value ): self | ||
| $value | string |
The text of the brand. |
public function brandText(string $value): self
{
$new = clone $this;
$new->brandText = $value;
return $new;
}
Returns a new instance with the specified HTML attributes for the brand text.
| public brandTextAttributes( array $values ): self | ||
| $values | array |
Attribute values indexed by attribute names. \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;
}
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 brandUrl( string $value ): self | ||
| $value | string | |
public function brandUrl(string $value): self
{
$new = clone $this;
$new->brandUrl = $value;
return $new;
}
Returns a new instance with the specified HTML attributes for the burger.
| public burgerAttributes( array $values ): self | ||
| $values | array |
Attribute values indexed by attribute names. \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;
}
Returns a new instance with the specified the CSS class of the burger.
| public burgerCssClass( string $value ): self | ||
| $value | string |
The CSS class. |
public function burgerCssClass(string $value): self
{
$new = clone $this;
$new->burgerCssClass = $value;
return $new;
}
Returns a new instance with the specified the CSS class of the navbar.
| public cssClass( string $value ): self | ||
| $value | string |
The CSS class. |
public function cssClass(string $value): self
{
$new = clone $this;
$new->cssClass = $value;
return $new;
}
Returns a new instance with the specified ID of the widget.
| public id( string $value ): self | ||
| $value | string |
The ID of the widget. |
public function id(string $value): self
{
$new = clone $this;
$new->attributes['id'] = $value;
return $new;
}
Returns a new instance with the specified the CSS class of the items navbar.
| public itemCssClass( string $value ): self | ||
| $value | string |
The CSS class. |
public function itemCssClass(string $value): self
{
$new = clone $this;
$new->itemCssClass = $value;
return $new;
}
Signup or Login in order to comment.