k1low / property-enum
Property based enum plugin for CakePHP 3
Fund package maintenance!
k1LoW
Installs: 22 521
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 5
Open Issues: 3
Type:cakephp-plugin
Requires
- php: >=5.4.16
- cakedc/enum: >=1.4.0
- cakephp/cakephp: ^3.6
Requires (Dev)
- cakephp/cakephp-codesniffer: ^2.1
- phpunit/phpunit: <6.0
README
This plugin is PropertyStrategy of CakeDC/Enum
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require k1low/property-enum
Property Example
class ArticlesTable extends Table { public $enums = [ 'status' => [ 'public' = 'Published'; 'draft' = 'Drafted'; 'archive' = 'Archived'; ], ]; public function initialize(array $config) { $this->addBehavior('PropertyEnum.Enum', ['lists' => [ 'status' => [ 'strategy' => 'property', ] ]]); } }