PHPackages                             yii2tech/admin - 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. yii2tech/admin

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

yii2tech/admin
==============

Admin pack (actions, widgets, etc) for Yii2

1.1.0(8y ago)10739.8k↓50%195BSD-3-ClausePHPPHP &gt;=5.6.0

Since Jan 6Pushed 6y ago13 watchersCompare

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

READMEChangelogDependencies (2)Versions (7)Used By (5)

 [ ![](https://avatars2.githubusercontent.com/u/12951949) ](https://github.com/yii2tech)

Admin pack for Yii 2
====================

[](#admin-pack-for-yii-2)

This extension provides controllers, actions, widgets and other tools for administration panel creation in Yii2 project.

For license information check the [LICENSE](LICENSE.md)-file.

[![Latest Stable Version](https://camo.githubusercontent.com/5eb4885970e8d7b8a2ad252c305ba0d19153521cdf993879901e460f2a4a1718/68747470733a2f2f706f7365722e707567782e6f72672f79696932746563682f61646d696e2f762f737461626c652e706e67)](https://packagist.org/packages/yii2tech/admin)[![Total Downloads](https://camo.githubusercontent.com/432c75cf8b412724e33b61709d5cbce4da5b2377a97c2effc7a999a98f4b16ef/68747470733a2f2f706f7365722e707567782e6f72672f79696932746563682f61646d696e2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/yii2tech/admin)[![Build Status](https://camo.githubusercontent.com/6dd69f942703d527e7a26061c9d61b8b546d1eac92c3492e4bee633b0ead0f9d/68747470733a2f2f7472617669732d63692e6f72672f79696932746563682f61646d696e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/yii2tech/admin)

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist yii2tech/admin

```

or add

```
"yii2tech/admin": "*"
```

to the require section of your composer.json.

Usage
-----

[](#usage)

This extension provides controllers, actions, widgets and other tools for administration panel creation in Yii2 project. These tools are meant to be used together for the rapid web application administration panel composition.

This package supports usage of following extensions:

- [yii2tech/ar-position](https://github.com/yii2tech/ar-position)
- [yii2tech/ar-role](https://github.com/yii2tech/ar-role)
- [yii2tech/ar-search](https://github.com/yii2tech/ar-search)
- [yii2tech/ar-softdelete](https://github.com/yii2tech/ar-softdelete)
- [yii2tech/ar-variation](https://github.com/yii2tech/ar-variation)

> Note: none of these extensions is required by default, you'll need to install them yourself, if needed.

Actions
--------

[](#actions-)

This extension provides several independent action classes, which provides particular operation support:

- \[\[\\yii2tech\\admin\\actions\\Index\]\] - displays the models listing with search support.
- \[\[\\yii2tech\\admin\\actions\\Create\]\] - supports creation of the new model using web form.
- \[\[\\yii2tech\\admin\\actions\\Update\]\] - supports updating of the existing model using web form.
- \[\[\\yii2tech\\admin\\actions\\Delete\]\] - performs the deleting of the existing record.
- \[\[\\yii2tech\\admin\\actions\\View\]\] - displays an existing model.
- \[\[\\yii2tech\\admin\\actions\\SoftDelete\]\] - performs the "soft" deleting of the existing record.
- \[\[\\yii2tech\\admin\\actions\\SafeDelete\]\] - performs the "safe" deleting of the existing record.
- \[\[\\yii2tech\\admin\\actions\\Restore\]\] - performs the restoration of the "soft" deleted record.
- \[\[\\yii2tech\\admin\\actions\\Callback\]\] - allows invocation of specified method of the model.
- \[\[\\yii2tech\\admin\\actions\\Position\]\] - allows change custom sort position of the particular model.
- \[\[\\yii2tech\\admin\\actions\\VariationCreate\]\] - supports creation of the new model with variations using web form.
- \[\[\\yii2tech\\admin\\actions\\VariationUpdate\]\] - supports updating of the new model with variations using web form.
- \[\[\\yii2tech\\admin\\actions\\RoleCreate\]\] - supports creation of the new model with role using web form.
- \[\[\\yii2tech\\admin\\actions\\RoleUpdate\]\] - supports updating of the new model with role using web form.

Please refer to the particular action class for more details.

For example CRUD controller based on provided actions may look like following:

```
namespace app\controllers;

use yii\web\Controller;

class ItemController extends Controller
{
    public function actions()
    {
        return [
            'index' => [
                'class' => \yii2tech\admin\actions\Index::class,
                'newSearchModel' => function () {
                    return new ItemSearch();
                },
            ],
            'view' => [
                'class' => \yii2tech\admin\actions\View::class,
            ],
            'create' => [
                'class' => \yii2tech\admin\actions\Create::class,
            ],
            'update' => [
                'class' => \yii2tech\admin\actions\Update::class,
            ],
            'delete' => [
                'class' => \yii2tech\admin\actions\Delete::class,
            ],
        ];
    }

    public function findModel($id)
    {
        if (($model = Item::findOne($id)) !== null) {
            return $model;
        }
        throw new NotFoundHttpException('The requested page does not exist.');
    }

    public function newModel()
    {
        return new Item();
    }
}
```

Controllers
------------

[](#controllers-)

This extension provides several predefined controllers, which can be used as a base controller classes while creating particular controllers:

- \[\[\\yii2tech\\admin\\CrudController\]\] - implements a common set of actions for supporting CRUD for ActiveRecord.

Please refer to the particular controller class for more details.

Widgets
--------

[](#widgets-)

This extension provides several widgets, which simplifies view composition for the typical use cases:

- \[\[\\yii2tech\\admin\\widgets\\Alert\]\] - renders a message from session flash.
- \[\[\\yii2tech\\admin\\widgets\\ActionAlert\]\] - renders an action proposition based on particular condition, usually a session flag.
- \[\[\\yii2tech\\admin\\widgets\\ButtonContextMenu\]\] - simplifies rendering of the context links such as 'update', 'view', 'delete' etc.
- \[\[\\yii2tech\\admin\\widgets\\Nav\]\] - enhanced version of \[\[\\yii\\bootstrap\\Nav\]\], which simplifies icon rendering.

Also several enhancements for the \[\[\\yii\\grid\\GridView\]\] are available:

- \[\[\\yii2tech\\admin\\grid\\ActionColumn\]\] - simplifies composition of the action buttons
- \[\[\\yii2tech\\admin\\grid\\DeleteStatusColumn\]\] - serves for the 'soft-deleted' status displaying
- \[\[\\yii2tech\\admin\\grid\\PositionColumn\]\] - provides simple interface for the model custom sort position switching
- \[\[\\yii2tech\\admin\\grid\\VariationColumn\]\] - allows displaying of the variation column values

Using Gii
----------

[](#using-gii-)

This extension provides a code generators, which can be integrated with yii 'gii' module. In order to enable them, you should adjust your application configuration in following way:

```
return [
    //....
    'modules' => [
        // ...
        'gii' => [
            'class' => yii\gii\Module::class,
            'generators' => [
                'adminMainFrame' => [
                    'class' => yii2tech\admin\gii\mainframe\Generator::class
                ],
                'adminCrud' => [
                    'class' => yii2tech\admin\gii\crud\Generator::class
                ]
            ],
        ],
    ]
];
```

"MainFrame" generator creates a basic admin panel code, which includes layout files, main controller file and basic view files. The created structure is necessary for the correct rendering of the code created by "Admin CRUD" generator.

"Admin CRUD" generator is similar to regular "CRUD" generator, but it generates code, which uses tools from this extension, so the result code is much more clean.

Internationalization
---------------------

[](#internationalization-)

All text and messages introduced in this extension are translatable under category 'yii2tech-admin'. You may use translations provided within this extension, using following application configuration:

```
return [
    'components' => [
        'i18n' => [
            'translations' => [
                'yii2tech-admin' => [
                    'class' => yii\i18n\PhpMessageSource::class,
                    'basePath' => '@yii2tech/admin/messages',
                ],
                // ...
            ],
        ],
        // ...
    ],
    // ...
];
```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 95.3% 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 ~91 days

Total

6

Last Release

2961d ago

Major Versions

1.1.0 → 2.0.x-dev2018-04-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/854af1889dd7384243cff0bf0fde23463f76058b499b15c740f02e7033ec7ce6?d=identicon)[klimov-paul](/maintainers/klimov-paul)

---

Top Contributors

[![klimov-paul](https://avatars.githubusercontent.com/u/1482054?v=4)](https://github.com/klimov-paul "klimov-paul (101 commits)")[![AnatolyRugalev](https://avatars.githubusercontent.com/u/1397674?v=4)](https://github.com/AnatolyRugalev "AnatolyRugalev (1 commits)")[![Faryshta](https://avatars.githubusercontent.com/u/2029247?v=4)](https://github.com/Faryshta "Faryshta (1 commits)")[![gugoan](https://avatars.githubusercontent.com/u/1585443?v=4)](https://github.com/gugoan "gugoan (1 commits)")[![maxxer](https://avatars.githubusercontent.com/u/240201?v=4)](https://github.com/maxxer "maxxer (1 commits)")[![Ryadnov](https://avatars.githubusercontent.com/u/265502?v=4)](https://github.com/Ryadnov "Ryadnov (1 commits)")

---

Tags

adminadmin-crudadministrationyiiyii2yii2-extensionyii2crudadminadministration

### Embed Badge

![Health badge](/badges/yii2tech-admin/health.svg)

```
[![Health](https://phpackages.com/badges/yii2tech-admin/health.svg)](https://phpackages.com/packages/yii2tech-admin)
```

###  Alternatives

[luyadev/luya-module-admin

Administration core module for all LUYA admin modules

48179.0k24](/packages/luyadev-luya-module-admin)

PHPackages © 2026

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