Class dmitrybtn\yimp\widgets\Menu

Inheritancedmitrybtn\yimp\widgets\Menu » yii\bootstrap4\Nav

Extension of yii\bootstrap4\Nav, providing some additional functionality.

The following functionality is provided:

  1. Generate item as a <span> tag if it's url property is not set.
  2. Config default HTML attributes for all items.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$linkOptions array The HTML attributes, used if item linkOptions is not set. dmitrybtn\yimp\widgets\Menu

Public Methods

Hide inherited methods

MethodDescriptionDefined By
renderItem() Overrides yii\bootstrap4\Nav::renderItem to work with items with empty url. dmitrybtn\yimp\widgets\Menu

Property Details

$linkOptions public property

The HTML attributes, used if item linkOptions is not set.

public array $linkOptions = []

Method Details

renderItem() public method

Overrides yii\bootstrap4\Nav::renderItem to work with items with empty url.

public array|string renderItem ( $sttItem )
$sttItem array|string
throws \yii\base\InvalidConfigException