williamespindola / field
Field provider
Requires
- php: >=5.4
- doctrine/orm: 2.5.0
- ocramius/generated-hydrator: 1.1.0
- respect/relational: ^0.8
Requires (Dev)
- behat/behat: ~3.0
- phpunit/phpunit: 4.*
Suggests
- doctrine/orm: orm 2.5.0, if you want to work with doctrine
- respect/relational: relational ^0.8, if you want to work with relational
This package is not auto-updated.
Last update: 2024-10-26 18:01:15 UTC
README
Field is a blueprint to work as a CMS inspired on cockpit. Via command line you can create fields for your partials and consume in your project using Repository, Services or Extensions.
Features
- Mult language database schema
- Collection of fields
- Options of fields
- CLI interface
- Services, Repositories and Storage
- Doctrine and Relational suport (cli only work with relational see issue #27)
Example
You can create Languages, Collections, Fields and Options. Here some examples:
php vendor/bin/field create Language en_EN English
php vendor/bin/field create Collection header Header en_EN
php vendor/bin/field create Field about "About text" en_EN html
php vendor/bin/field create Field meta-keys Metakeys en_EN text header
php vendor/bin/field create Field contact Contact en_EN text
php vendor/bin/field create Option Girl contact en_EN
php vendor/bin/field create Option Boy contact en_EN
Now you can use some repository or services to consume, or implement the storage as you need and white you own repository and services. Example!
use WilliamEspindola\Field\Storage\ORM\Doctrine; use WilliamEspindola\Field\Repository\FieldRepository; $doctrineStorage = new Doctrine(/** doctrine setup */); // you can uss orther ORM as you want $repository = new FieldRepository($doctrineStorage); $repository->findAll()
Install
Via Composer
$ composer require williamespindola/field
Usage
php vendor/bin/field
See all documentation on Wiki
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email oi@williamespindola.com.br instead of using the issue tracker.
Credits
License
The BSD License (BSD). Please see License File for more information.