jeffersonsimaogoncalves / property-enum
Property based enum plugin for CakePHP 3
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 5
Type:cakephp-plugin
Requires
- php: ^5.4.16|^7.2
- cakedc/enum: >=1.4.0
- cakephp/cakephp: ^3.0|^4.0
Requires (Dev)
- cakephp/cakephp-codesniffer: ^2.1
- phpunit/phpunit: >=5.6.3|^8.0
This package is auto-updated.
Last update: 2025-01-30 02:47:43 UTC
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', ] ]]); } }