Skip to content

Controller behavior facilitates the use of dynamic layout.

Notifications You must be signed in to change notification settings

dynamikaweb/yii2-layout-behavior

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dynamikaweb/yii2-layout-behavior

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.

About

Controller behavior facilitates the use of dynamic layout.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages