PHPackages                             zanevskyas/yii2-helpers - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zanevskyas/yii2-helpers

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

zanevskyas/yii2-helpers
=======================

Kakadu helpers for Yii2

v1.0.0(3y ago)01.1k↓33.9%MITPHPPHP &gt;=7.1

Since Oct 5Pushed 3y ago1 watchersCompare

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

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

yii2-helpers
============

[](#yii2-helpers)

Yii2 Helpers

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist zanevskyas/yii2-helpers "@dev"
```

or add

```
"zanevskyas/yii2-helpers": "@dev"

```

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

RBAC
----

[](#rbac)

Add below code to console main configuration:

```
'controllerMap' => [
    ...
    'rbac'    => [
        'class'      => Kakadu\Yii2Helpers\Rbac::class,
        'rbacConfig' => RbacConfig::class,
    ],
    ...
]
```

Create RbacConfigClass in `common/rbac`, sample:

```
abstract class RbacConfig
{
    /**
     * @var string|Enum
     */
    public static $roleClass = CustomerRole::class;

    /**
     * @var array
     */
    public static $roleRelationships = [
        CustomerRole::CUSTOMER,
        CustomerRole::AUTHOR      => [
            CustomerRole::CUSTOMER,
        ],
        ...
    ];

    /**
     * @var array|PermissionCustomer
     */
    public static $permissions = [
        // Customers
        PermissionCustomer::class,
        PermissionSettings::class,

        // Countries
        ...
        // Cities
        ...
    ];
}
```

Create permissions and rules...

Permission example:

```
abstract class PermissionSettings
{
    public const CREATE     = 'CUSTOMER_SETTINGS_CREATE';
    public const UPDATE     = 'CUSTOMER_SETTINGS_UPDATE';
    public const UPDATE_OWN = 'CUSTOMER_SETTINGS_UPDATE_OWN';
    public const VIEW       = 'CUSTOMER_SETTINGS_VIEW';
    public const VIEW_OWN   = 'CUSTOMER_SETTINGS_VIEW_OWN';

    /**
     * @var array
     */
    public static $ruleRelationships = [
        self::UPDATE_OWN => RuleOwnerCustomerSettings::class,
        self::VIEW_OWN   => RuleOwnerCustomerSettings::class,
    ];

    /**
     * @var array
     */
    public static $permissionRelationships = [
        self::UPDATE_OWN => [
            self::UPDATE,
        ],
        self::VIEW_OWN   => [
            self::VIEW,
        ],
    ];

    /**
     * @var array
     */
    public static $roleRelationships = [
        CustomerRole::CUSTOMER => [
            self::UPDATE_OWN,
            self::VIEW_OWN,
        ],
        CustomerRole::ADMIN    => [
            self::CREATE,
            self::UPDATE,
            self::VIEW,
        ],
    ];
}
```

Run console command to generate rbac cache:

```
php yii rbac/init
```

That's all. Check it.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

1321d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6a20b0454d11b15982a0a6aed979d85304da581c5fcd324c4bf5b71f983c103b?d=identicon)[zanevskyas](/maintainers/zanevskyas)

---

Top Contributors

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

---

Tags

helpersyii2extensionkakadu

### Embed Badge

![Health badge](/badges/zanevskyas-yii2-helpers/health.svg)

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

###  Alternatives

[avator/yii2-turbosms

Yii2 turbosms

1030.5k](/packages/avator-yii2-turbosms)[yiier/yii2-helpers

Helpers for Yii2

116.6k2](/packages/yiier-yii2-helpers)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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