PHPackages                             jberall/yii2-statusbehavior - 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. jberall/yii2-statusbehavior

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

jberall/yii2-statusbehavior
===========================

A behavior that set the status to 0 when the status\_column is set to null. triggered on BaseActiveRecord::EVENT\_BEFORE\_INSERT and BaseActiveRecord::EVENT\_BEFORE\_UPDATE

v1.03(9y ago)014Apache-2.0PHP

Since Apr 27Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jberall/yii2-statusbehavior)[ Packagist](https://packagist.org/packages/jberall/yii2-statusbehavior)[ RSS](/packages/jberall-yii2-statusbehavior/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

Status Behavior
===============

[](#status-behavior)

A behavior that set the status to 0 when the status\_column is set to null. triggered on BaseActiveRecord::EVENT\_BEFORE\_INSERT and BaseActiveRecord::EVENT\_BEFORE\_UPDATE

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist jberall/yii2-statusbehavior "*"

```

or add

```
"jberall/yii2-statusbehavior": "*"

```

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

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
    public function behaviors() {

        $behaviors = [

            'statusBehavior' => [
				'class' => \frontend\behaviors\StatusBehavior::className(),
				'status_column' => 'status_id',

			],
        ];
        return ArrayHelper::merge(parent::behaviors(),$behaviors);

    }
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity66

Established project with proven stability

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 ~9 days

Total

4

Last Release

3317d ago

### Community

Maintainers

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

---

Tags

yii2extensionBehaviorstatus

### Embed Badge

![Health badge](/badges/jberall-yii2-statusbehavior/health.svg)

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

###  Alternatives

[sjaakp/yii2-taggable

Manage tags of ActiveRecord in Yii2.

3031.8k](/packages/sjaakp-yii2-taggable)[mdmsoft/yii2-autonumber

Auto number extension for the Yii framework

1831.2k](/packages/mdmsoft-yii2-autonumber)[valentinek/yii2-closure-table-behavior

This extension allows you to get functional for closure table trees.

1615.4k](/packages/valentinek-yii2-closure-table-behavior)[v0lume/yii2-meta-tags

DB based model meta data for SEO

194.1k](/packages/v0lume-yii2-meta-tags)

PHPackages © 2026

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