dynamikaweb/yii2-layout-behavior

Controller behavior facilitates the use of dynamic layout.

Installs: 549

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

Type:yii2-extension

1.0 2021-07-22 19:00 UTC

This package is auto-updated.

Last update: 2024-04-29 04:21:37 UTC


README

php version pkg version license quality build

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require dynamikaweb/yii2-layout-behavior "*"

or add

"dynamikaweb/yii2-layout-behavior": "*"

to the require section of your composer.json file.

Usage

edit the SomeController.php file.

class SomeController extends Controller
{
    public function behaviors()
    {
        return [
            [
                'class' => 'dynamikaweb\layout\ChangeLayout',
                'when' => Yii::$app->user->isGuest,
                'layout' => 'login'
            ],
            ...
        ]
    }
}

dynamika soluções web This project is under BSD-3-Clause license.