dynamikaweb / yii2-layout-behavior
Controller behavior facilitates the use of dynamic layout.
Installs: 743
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Type:yii2-extension
Requires
- php: >=7.0
- yiisoft/yii2: *
README
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' ], ... ] } }
This project is under BSD-3-Clause license.