Class humhub\widgets\Tabs

Inheritancehumhub\widgets\Tabs » yii\bootstrap\Tabs
Subclasseshumhub\widgets\SettingsTabs
Available since version1.2.2

Extends \yii\bootstrap\Tabs by providing providing view based tab items.

View based tabs usage:

<?= Tabs::widget([ 'viewPath' => '@myModule/views/common', 'params' => $params, 'items' => [ [

 'label' => 'One',
 'view' => 'example',
 'active' => true

], [

 'label' => 'Two',
 'view' => '@myModule/views/example',
 'params' => ['model' => new SomeModel()]

], ] ]); ?>

See also \yii\bootstrap\Tabs.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$navType humhub\widgets\Tabs
$params array Global view parameter will be used for all view based items without own params setting humhub\widgets\Tabs
$viewPath string Contains the viewPath humhub\widgets\Tabs

Public Methods

Hide inherited methods

MethodDescriptionDefined By
addItem() humhub\widgets\Tabs
beforeRun() humhub\widgets\Tabs
isCurrentRoute() Checks if the current route contains the given route parts $modelId, $controllerId, ┬žactionId humhub\widgets\Tabs

Property Details

$navType public property
public $navType 'nav-tabs tab-menu'
$params public property

Global view parameter will be used for all view based items without own params setting

public array $params null
$viewPath public property

Contains the viewPath

public string $viewPath null

Method Details

addItem() public method

public void addItem ( $item )
$item
beforeRun() public method

public void beforeRun ( )
isCurrentRoute() public method

Checks if the current route contains the given route parts $modelId, $controllerId, ┬žactionId

public boolean isCurrentRoute ( $moduleId null, $controllerId null, $actionId null )
$moduleId null
$controllerId
$actionId