PHPackages                             nullref/yii2-useful - 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. nullref/yii2-useful

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

nullref/yii2-useful
===================

Useful things for Yii2

v0.0.4(8y ago)68.2k1[2 issues](https://github.com/NullRefExcep/yii2-useful/issues)5MITPHPPHP &gt;=5.4.0

Since Aug 11Pushed 6y ago6 watchersCompare

[ Source](https://github.com/NullRefExcep/yii2-useful)[ Packagist](https://packagist.org/packages/nullref/yii2-useful)[ Docs](https://github.com/NullRefExcep/yii2-common-behaviors)[ RSS](/packages/nullref-yii2-useful/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (5)

Yii2-useful
===========

[](#yii2-useful)

[![Latest Stable Version](https://camo.githubusercontent.com/6ef8c93dcdb99d6a837ee7cf43bc9cdc3aa02fe89fe79cd8d34338072765d3d4/68747470733a2f2f706f7365722e707567782e6f72672f6e756c6c7265662f796969322d75736566756c2f762f737461626c65)](https://packagist.org/packages/nullref/yii2-useful) [![Total Downloads](https://camo.githubusercontent.com/056e0b1df85f37a6b7418fc1915b81528e60b06d367643b7956dee212b4e0eca/68747470733a2f2f706f7365722e707567782e6f72672f6e756c6c7265662f796969322d75736566756c2f646f776e6c6f616473)](https://packagist.org/packages/nullref/yii2-useful) [![Latest Unstable Version](https://camo.githubusercontent.com/a4348ce72ae9573e6b99e4b2a53d304df3acb6744fd2216d7f5caa241e363d06/68747470733a2f2f706f7365722e707567782e6f72672f6e756c6c7265662f796969322d75736566756c2f762f756e737461626c65)](https://packagist.org/packages/nullref/yii2-useful) [![License](https://camo.githubusercontent.com/69d49fdd0b6597a2b0a6e860e872f6ca1866b5448fa79522e8aab0094d1b9d5d/68747470733a2f2f706f7365722e707567782e6f72672f6e756c6c7265662f796969322d75736566756c2f6c6963656e7365)](https://packagist.org/packages/nullref/yii2-useful)

Collection helpful classes for Yii2

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

[](#installation)

```
composer require nullref/yii2-useful --prefer-dist
```

Structure
---------

[](#structure)

### Actions

[](#actions)

- #### EditAction

    [](#editaction)

    Action for AJAX model update.
- #### MultipleDeleteAction

    [](#multipledeleteaction)

    Allows to delete multiple models.
- #### MultipleUpdateAction

    [](#multipleupdateaction)

    Allows to update multiple models.

### Behaviors

[](#behaviors)

- #### BinaryBehavior

    [](#binarybehavior)

    Allows encode and decode model fields as integer number.
- #### DateBehavior

    [](#datebehavior)

    Allows encode and decode model fields as Unix timestamp.
- #### JsonBehavior

    [](#jsonbehavior)

    Allows encode and decode model fields as JSON.
- #### RelatedBehavior

    [](#relatedbehavior)

    Allows to load related data for model.
- #### SerializeBehavior

    [](#serializebehavior)

    Allows encode and decode model fields as serialize php string.
- #### TranslationBehavior

    [](#translationbehavior)

    Allows to implement multilingual features.
- #### CacheTagDependencyBehavior

    [](#cachetagdependencybehavior)

    Allows to invalidate TagDependency when modify ActiveRecord

### Traits

[](#traits)

- #### GetDefinition

    [](#getdefinition)

    Allows to get defined in DI container class or default.
- #### HasPassword

    [](#haspassword)

    Allows to set and validate password for model.
- #### Mappable

    [](#mappable)

    Allows to get map from ActiveRecord.
- #### MappableQuery

    [](#mappablequery)

    Same as Mappable trait but for ActiveQuery.
- #### SessionModel

    [](#sessionmodel)

    Save and get object from session

### Filters

[](#filters)

- #### RedirectFilter

    [](#redirectfilter)

    Redirect after action by url param.

### Helpers

[](#helpers)

- #### Memoize

    [](#memoize)

    Class for calling memoized function or method.

Old version
-----------

[](#old-version)

(Will be remove from version 1.0.0)

### JSONBehavior

[](#jsonbehavior-1)

Allows save in text field customs data structure.

### ArrayBehavior

[](#arraybehavior)

Allows save in text field array structure.

### BitBehavior

[](#bitbehavior)

Allows save in integer field bit array.

### DropDownTrait

[](#dropdowntrait)

Allows get lists from ActiveRecord.

### PasswordTrait

[](#passwordtrait)

Easy work with password.

### EditAction

[](#editaction-1)

Action for AJAX record update.

### MultipleUpdateAction

[](#multipleupdateaction-1)

Action multiple update by list of IDs.

### TranslationBehavior

[](#translationbehavior-1)

Allows implement translations for models

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.8% 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 ~257 days

Total

4

Last Release

3162d ago

### Community

Maintainers

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

---

Top Contributors

[![ZAYEC77](https://avatars.githubusercontent.com/u/4509483?v=4)](https://github.com/ZAYEC77 "ZAYEC77 (46 commits)")[![serhiivinichuk](https://avatars.githubusercontent.com/u/1679511?v=4)](https://github.com/serhiivinichuk "serhiivinichuk (5 commits)")[![tenfrow](https://avatars.githubusercontent.com/u/7600781?v=4)](https://github.com/tenfrow "tenfrow (2 commits)")

---

Tags

phpyii2yii2-extensionframeworkyii2Behavior

### Embed Badge

![Health badge](/badges/nullref-yii2-useful/health.svg)

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

###  Alternatives

[skeeks/cms

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

13825.6k47](/packages/skeeks-cms)[tecnocen/yii2-formgenerator

Yii 2 Library to configure form generator

145.7k](/packages/tecnocen-yii2-formgenerator)

PHPackages © 2026

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