2017 © Pedro Peláez
 

yii2-extension yii2-menu

Yii2 module for menu creation.

image

sokyrko/yii2-menu

Yii2 module for menu creation.

  • Tuesday, November 29, 2016
  • by sokyrko
  • Repository
  • 0 Watchers
  • 1 Stars
  • 54 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 2 % Grown

The README.md

Yii2 menu module

Yii2 module for menu creation., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist sokyrko/yii2-menu "*"

or add, (*4)

"sokyrko/yii2-menu": "*"

to the require section of your composer.json file., (*5)

Run migration, (*6)

./yii migrate/up --migrationPath=@vendor/sokyrko/yii2-menu/migrations

Create controllers and include menu and menu-item traits. For example:, (*7)


class MenuController extends Controller { use MenuTrait; }

```php class MenuItemController extends Controller { use MenuItemTrait; }, (*8)


Usage ----- Minimal configuration: ```php <?= MenuWidget::widget([ 'menuName' => 'main_footer', 'menuWrapper' => '<ul class="bottom-nav">{items}</ul>', ]) ?>

Also you can define other settings:, (*9)

<?= MenuWidget::widget([
    'menuName' => 'main_header',
    'template' => function (MenuItem $current) {
        return Html::tag('li', Html::a($current->title, $current->url) . '{children}', [
            'class' => ($current->url == Url::to([''])) ? 'active' : '',
        ]);
    },
    'menuWrapper' => '<nav class="nav-holder"><ul id="nav">{items}</ul></nav>',
    'subMenuWrapper' => '<div class="drop"><ul>{items}</ul></div>',
]) ?>

The Versions

29/11 2016

dev-master

9999999-dev

Yii2 module for menu creation.

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar sokyrko

yii2 menu list creator

29/11 2016

v1.0.1

1.0.1.0

Yii2 module for menu creation.

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar sokyrko

yii2 menu list creator

28/11 2016

v1.0

1.0.0.0

Yii2 module for menu creation.

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar sokyrko

yii2 menu list creator