PHPackages                             pavlinter/yii2-adm - 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. [Admin Panels](/categories/admin)
4. /
5. pavlinter/yii2-adm

ActiveYii2-extension[Admin Panels](/categories/admin)

pavlinter/yii2-adm
==================

Yii2: Adm CMS

v2.0.7(8y ago)84477BSD 3-ClausePHP

Since Jan 19Pushed 8y ago5 watchersCompare

[ Source](https://github.com/pavlinter/yii2-adm)[ Packagist](https://packagist.org/packages/pavlinter/yii2-adm)[ RSS](/packages/pavlinter-yii2-adm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (27)Used By (0)

Yii2: Adm CMS
=============

[](#yii2-adm-cms)

[![Screen Shot](https://github.com/pavlinter/yii2-adm/raw/master/preview.png?raw=true)](https://github.com/pavlinter/yii2-adm/blob/master/preview.png?raw=true)

Установка
---------

[](#установка)

Удобнее всего установить это расширение через [composer](http://getcomposer.org/download/).

```
"pavlinter/yii2-adm": "dev-master",

```

Список включающих пакетов
-------------------------

[](#список-включающих-пакетов)

[pavlinter/yii2-dot-translation](https://github.com/pavlinter/yii2-dot-translation)
[pavlinter/yii2-url-manager](https://github.com/pavlinter/yii2-url-manager)
[pavlinter/yii2-buttons](https://github.com/pavlinter/yii2-buttons)
[mihaildev/yii2-ckeditor](https://github.com/MihailDev/yii2-ckeditor)
[mihaildev/yii2-elfinder](https://github.com/MihailDev/yii2-elfinder)
[kartik-v/yii2-grid](https://github.com/kartik-v/yii2-grid)
[kartik-v/yii2-detail-view](https://github.com/kartik-v/yii2-detail-view)
[kartik-v/yii2-widgets](https://github.com/kartik-v/yii2-widgets)
[kartik-v/yii2-checkbox-x](https://github.com/kartik-v/yii2-checkbox-x)
[kartik-v/yii2-icons](https://github.com/kartik-v/yii2-icons)

Настройка
---------

[](#настройка)

```
//console.php
'components' => [
    ...
    'authManager' => [
        'class' => 'yii\rbac\DbManager',
    ],
    ...
],
```

```
//main.php
'bootstrap' => [
    'urlManager',
    'i18n',
],
'modules' => [
    'adm' => [
        'class' => 'pavlinter\adm\Adm',
        'modules' => [

        ],
        /*
        'components' => [
            'manager' => [
                'loginFormClass' => 'pavlinter\adm\models\LoginForm',
                'userClass' => 'pavlinter\adm\models\User',
                'userSearchClass' => 'pavlinter\adm\models\UserSearch',
                'authItemClass' => 'pavlinter\adm\models\AuthItem',
                'authItemSearchClass' => 'pavlinter\adm\models\AuthItemSearch',
                'authRuleClass' => 'pavlinter\adm\models\AuthRule',
                'authRuleSearchClass' => 'pavlinter\adm\models\AuthRuleSearch',
                'authItemChildClass' => 'pavlinter\adm\models\AuthItemChild',
                'authItemChildSearchClass' => 'pavlinter\adm\models\AuthItemChildSearch',
                'authAssignmentClass' => 'pavlinter\adm\models\AuthAssignment',
                'authAssignmentSearchClass' => 'pavlinter\adm\models\AuthAssignmentSearch',
                'languageClass' => 'pavlinter\adm\models\Language',
                'languageSearchClass' => 'pavlinter\adm\models\LanguageSearch',
                'sourceMessageClass' => 'pavlinter\adm\models\SourceMessage',
                'sourceMessageSearchClass' => 'pavlinter\adm\models\SourceMessageSearch',
                'messageClass' => 'pavlinter\adm\models\Message',
            ],
        ],
        */
    ],
    'gridview'=> [
        'class'=>'\kartik\grid\Module',
    ],
    'gii' => [
        'class'      => 'yii\gii\Module',
        'generators' => [
            'model'   => [
                'class'     => '\pavlinter\adm\gii\generators\model\Generator',
            ],
            'crud'   => [
                'class'     => '\pavlinter\adm\gii\generators\crud\Generator',
            ],
            'module'   => [
                'class'     => '\pavlinter\adm\gii\generators\module\Generator',
            ],
        ]
    ],
],
'components' => [
    'user' => [
        'identityClass' => 'pavlinter\adm\models\User',
        'enableAutoLogin' => true,
    ],
    'authManager' => [
        'class' => 'yii\rbac\DbManager',
    ],
    'urlManager' => [
        'class'=>'\pavlinter\urlmanager\UrlManager', //https://github.com/pavlinter/yii2-url-manager
        'enableLang' => true,
        'langBegin' => ['ru','en'],
        'enablePrettyUrl' => true,
        'showScriptName' => false,
        'onlyFriendlyParams' => false,
        'ruleConfig' => [
            'class' => '\pavlinter\urlmanager\UrlRule',
        ],
        'rules' => []
    ],
    'i18n' => [
        'class'=>'pavlinter\translation\I18N', //https://github.com/pavlinter/yii2-dot-translation
        'access' => function () {
            return Yii::$app->getUser()->can('Adm-Transl');
        },
        'dialog' => 'jq',
        'router' => '/adm/source-message/dot-translation',
        'translations' => [
            'app*' => [
                'class' => 'pavlinter\translation\DbMessageSource',
                'forceTranslation' => true,
                'autoInsert' => true,
                'dotMode' => true,
            ],
        ],
    ],
],
```

Запустить миграцию
------------------

[](#запустить-миграцию)

```
yii migrate --migrationPath=@vendor/pavlinter/yii2-adm/adm/migrations
```

Вход в adm
----------

[](#вход-в-adm)

```
http://domain.com/adm
```

Доступ
------

[](#доступ)

```
username: adm
password: 123456
```

Дополнительный модуль
---------------------

[](#дополнительный-модуль)

[yii2-adm-pages](https://github.com/pavlinter/yii2-adm-pages)

Как дополнить adm?
------------------

[](#как-дополнить-adm)

Генерируешь модуль через gii или создаём сами ...

```
'modules' => [
    ...
    'adm' => [
        ...
        'modules' => [
            'my_module' // вызываем метод pavlinter\my_module\Module::loading когда adm layout
        ],
        ...
    ],
    'my_module' => [
        'class' => 'pavlinter\my_module\Module',
    ],
    ...
],
```

- Добавить в adm в левое меню свой модуль

```
//app\my_module\Module

class Module extends \yii\base\Module implements \pavlinter\adm\AdmBootstrapInterface
{
    ...
    public function loading($adm)
    {
        if ($adm->user->can('AdmRoot')) {
            $adm->params['left-menu']['my_module'] = [
                'label' => '' . $adm::t('menu', 'My module') . '',
                'url' => ['/my_module/default/index']
            ];
        }
    }
    ...
}
```

- Полностью закрыть доступ к модулю.

```
//app\my_module\Module
public function beforeAction($action)
{
    $adm = Adm::register();
    if (!parent::beforeAction($action) || !$adm->user->can('AdmRoot')) {
        return false;
    }
    return true;
}
```

- Частично закрыть доступ к модулю

```
//app\my_module\Module
public function beforeAction($action)
{
    if ($action->controller->id !== 'default') {
        $adm = Adm::register();
    }
    return parent::beforeAction($action);
}
```

```
//app\my_module\controllers\MyController
public function behaviors()
{
    return [
        'access' => [
            'class' => AccessControl::className(),
            'rules' => [
                [
                    'allow' => true,
                    'roles' => ['MyRole'],
                ],
            ],
        ],
    ];
}
```

- Если публичный модуль, то нужно создавать manager класов.
    [Пример](https://github.com/pavlinter/yii2-adm-pages/blob/master/admpages/Module.php#L72)
    [Manager](https://github.com/pavlinter/yii2-adm-pages/blob/master/admpages/ModelManager.php)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity73

Established project with proven stability

 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

Every ~42 days

Recently: every ~101 days

Total

26

Last Release

3075d ago

Major Versions

1.1.3 → 2.0.0-beta12016-08-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa81148f518734b069ef57f90038de857b4022a2a1b8d59a0f75ccada1747409?d=identicon)[pavlinter](/maintainers/pavlinter)

---

Top Contributors

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

---

Tags

cmsyii2adminadm

### Embed Badge

![Health badge](/badges/pavlinter-yii2-adm/health.svg)

```
[![Health](https://phpackages.com/badges/pavlinter-yii2-adm/health.svg)](https://phpackages.com/packages/pavlinter-yii2-adm)
```

###  Alternatives

[infoweb-internet-solutions/yii2-cms

CMS module for Yii2

461.7k8](/packages/infoweb-internet-solutions-yii2-cms)

PHPackages © 2026

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