berduj / propel-enable-disable-behavior
Enable / Disabe rows for Propel2
Package info
github.com/berduj/PropelEnableDisableBehavior
Type:propel-behavior
pkg:composer/berduj/propel-enable-disable-behavior
1.0.0
2016-03-03 09:22 UTC
Requires
- php: >=5.4
- propel/propel: ~2.0@dev
This package is auto-updated.
Last update: 2026-03-11 05:45:58 UTC
README
The Behavior adds "enabled" column in table, and adds methods to enable/disable each rows.
Installation
Add the package to your composer.json:
{
"require": {
"berduj/PropelEnableDisableBehavior"
}
}
Usage
<table name="sample_table"> <column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" /> <column name="title" type="VARCHAR" /> <behavior name="enable-disable"/> </table>
Added methods :
Object methods:
$object->enable();
$object->disable();
Query methods:
ObjectQuery::create()->findEnabled();
ObjectQuery::create()->findDisabled();
License
See the LICENSE file.