PHPackages                             dynamikaweb/yii2-layout-behavior - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. dynamikaweb/yii2-layout-behavior

ActiveYii2-extension[Framework](/categories/framework)

dynamikaweb/yii2-layout-behavior
================================

Controller behavior facilitates the use of dynamic layout.

1.0(4y ago)11.2k↓50%BSD-3-ClausePHPPHP &gt;=7.0

Since Jul 22Pushed 4y agoCompare

[ Source](https://github.com/dynamikaweb/yii2-layout-behavior)[ Packagist](https://packagist.org/packages/dynamikaweb/yii2-layout-behavior)[ RSS](/packages/dynamikaweb-yii2-layout-behavior/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

dynamikaweb/yii2-layout-behavior
================================

[](#dynamikawebyii2-layout-behavior)

[![php version](https://camo.githubusercontent.com/cec43abfd7e7069aa4ad087fd8cb5bfd1287c938cbf9a0934135ac633eaac5a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f64796e616d696b617765622f796969322d6c61796f75742d6265686176696f72)](https://camo.githubusercontent.com/cec43abfd7e7069aa4ad087fd8cb5bfd1287c938cbf9a0934135ac633eaac5a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f64796e616d696b617765622f796969322d6c61796f75742d6265686176696f72)[![pkg version](https://camo.githubusercontent.com/abd5421976840b887f881ed62ac3897848e5da9860234ae9da4382a8c9947624/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64796e616d696b617765622f796969322d6c61796f75742d6265686176696f72)](https://camo.githubusercontent.com/abd5421976840b887f881ed62ac3897848e5da9860234ae9da4382a8c9947624/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64796e616d696b617765622f796969322d6c61796f75742d6265686176696f72)[![license](https://camo.githubusercontent.com/08e52656e1b4c3f220c8cf95c7ad35addcaee3d03dff52d462580cfd5c91cd6e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f64796e616d696b617765622f796969322d6c61796f75742d6265686176696f72)](https://camo.githubusercontent.com/08e52656e1b4c3f220c8cf95c7ad35addcaee3d03dff52d462580cfd5c91cd6e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f64796e616d696b617765622f796969322d6c61796f75742d6265686176696f72)[![quality](https://camo.githubusercontent.com/a28533e446e5277070af4ad5d4ec9d42c71d43765ec2dc41910146ce2352303b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f64796e616d696b617765622f796969322d6c61796f75742d6265686176696f72)](https://camo.githubusercontent.com/a28533e446e5277070af4ad5d4ec9d42c71d43765ec2dc41910146ce2352303b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f64796e616d696b617765622f796969322d6c61796f75742d6265686176696f72)[![build](https://camo.githubusercontent.com/2300da75f3390c91bb992cc1dd29ee062169ed64d94d022ebad46f17d4f9b342/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f64796e616d696b617765622f796969322d6c61796f75742d6265686176696f72)](https://camo.githubusercontent.com/2300da75f3390c91bb992cc1dd29ee062169ed64d94d022ebad46f17d4f9b342/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f64796e616d696b617765622f796969322d6c61796f75742d6265686176696f72)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

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

```

or add

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

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#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](https://avatars.githubusercontent.com/dynamikaweb?size=12)](https://dynamika.com.br)This project is under [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) license.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1752d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29123479?v=4)[DornellesTV](/maintainers/RodrigoDornelles)[@RodrigoDornelles](https://github.com/RodrigoDornelles)

---

Top Contributors

[![RodrigoDornelles](https://avatars.githubusercontent.com/u/29123479?v=4)](https://github.com/RodrigoDornelles "RodrigoDornelles (4 commits)")

---

Tags

yii2Behaviordynamika

### Embed Badge

![Health badge](/badges/dynamikaweb-yii2-layout-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/dynamikaweb-yii2-layout-behavior/health.svg)](https://phpackages.com/packages/dynamikaweb-yii2-layout-behavior)
```

###  Alternatives

[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k46](/packages/skeeks-cms)[arogachev/yii2-sortable

Sortable ActiveRecord for Yii 2 framework

1637.0k4](/packages/arogachev-yii2-sortable)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
