PHPackages                             jeanvaljean/active-behavior - 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. jeanvaljean/active-behavior

ActiveCakephp-plugin

jeanvaljean/active-behavior
===========================

Active plugin for CakePHP

3.1.0(7y ago)017MITPHPPHP &gt;=5.6.0

Since Oct 2Pushed 7y agoCompare

[ Source](https://github.com/JeanValJeann/cakephp-active-behavior)[ Packagist](https://packagist.org/packages/jeanvaljean/active-behavior)[ Docs](https://github.com/JeanValJeann/cakephp-active-behavior)[ RSS](/packages/jeanvaljean-active-behavior/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (2)Used By (0)

CakePHP 3.6+ Active Behavior
============================

[](#cakephp-36-active-behavior)

[![Build Status](https://camo.githubusercontent.com/bfd291dd2df6c85f1f091bb0f701c7f3a630364a454fba4d97db8db5955631b6/68747470733a2f2f7472617669732d63692e6f72672f4a65616e56616c4a65616e6e2f63616b657068702d6163746976652d6265686176696f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/JeanValJeann/cakephp-active-behavior)[![Latest Stable Version](https://camo.githubusercontent.com/a210e2d6466ecdc9e99483894e7dbb139e5b1cc46bb6bf36b42bb5dbed4256eb/68747470733a2f2f706f7365722e707567782e6f72672f6a65616e76616c6a65616e2f6163746976652d6265686176696f722f762f737461626c65)](https://packagist.org/packages/jeanvaljean/active-behavior)[![Minimum PHP Version](https://camo.githubusercontent.com/e97290c4047b8fc1152177fc8110cab416f31f18159b722b6b633a210a198861/687474703a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230352e362d3838393242462e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/31702e06cb1d06066aa51d594671f7850119f225529521cf8365aef1b8637705/68747470733a2f2f706f7365722e707567782e6f72672f6a65616e76616c6a65616e2f6163746976652d6265686176696f722f6c6963656e7365)](https://packagist.org/packages/jeanvaljean/active-behavior)[![Total Downloads](https://camo.githubusercontent.com/540524a820aa84b76c388506d75971f6f5578803d01eb302bdadd3d827edbc5e/68747470733a2f2f706f7365722e707567782e6f72672f6a65616e76616c6a65616e2f6163746976652d6265686176696f722f646f776e6c6f616473)](https://packagist.org/packages/jeanvaljean/active-behavior)

A plugin to manage an active column

This plugin is for CakePHP 3.6+.

Setup
-----

[](#setup)

```
composer require jeanvaljean/active-behavior

```

Usage
-----

[](#usage)

Make sure the table that you want for using the active plugin has a column to store the active state of an entity. According to the pluging default configuration this column has to be named "active" and has to be:

```
['type' => 'integer', 'default' => 0, 'limit' => 1, 'null' => false]
```

**Note** : If you want to use an other column to store the active state of an entity, you can do it, you just have to mention it into pluing configuration using "active\_field".

Add the Active behavior in `initialize()` method of your table:

```
$this->addBehavior('Active.Active');
```

Now the active behavior is available on this table class.

### Configuration

[](#configuration)

The behavior configuration allow you to mention :

- active\_field : the table's field you want for storing the active state of an entity
- group : the table's field you want to use for grouping the active behavior on specific entities
- keep\_active : to make sure that always one entity is active
- multiple : to authorize several entities to be active

The default plugin configuration is as below :

```
$this->addBehavior('Active.Active', [
	'active_field' => 'active', // the table's field you want for storing the active state of an entity
	'group' => '', // the table's field you want to use for grouping the active behavior on specific entities
	'keep_active' => true, // to make sure that always one entity is active
	'multiple' => false // to authorize several entities to be active
]);
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

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

2778d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

cakephpBehavioractivejeanvaljean

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jeanvaljean-active-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/jeanvaljean-active-behavior/health.svg)](https://phpackages.com/packages/jeanvaljean-active-behavior)
```

###  Alternatives

[josegonzalez/cakephp-upload

CakePHP plugin to handle file uploading sans ridiculous automagic

5451.3M9](/packages/josegonzalez-cakephp-upload)[cakephp/migrations

Database Migration plugin for CakePHP

13912.0M222](/packages/cakephp-migrations)[muffin/trash

Adds soft delete support to CakePHP ORM tables.

851.3M11](/packages/muffin-trash)[itosho/easy-query

CakePHP behavior plugin for easily generating some complicated queries like (bulk) insert/upsert etc.

2623.2k](/packages/itosho-easy-query)[lorenzo/linkable

CakePHP Linkable Behavior

2753.3k](/packages/lorenzo-linkable)[asper/cakephp-enum-behavior

Introduces an alternative way to support some ENUM types in CakePHP

101.9k](/packages/asper-cakephp-enum-behavior)

PHPackages © 2026

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