cradlephp / cradle-system
Schema, Relations, Object events and controllers for Cradle
Installs: 1 670
Dependents: 3
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 8
Type:cradle-package
Requires
- cradlephp/cradle-admin: ~2.3.0
- cradlephp/storm: ~2.3.0
- elasticsearch/elasticsearch: 2.2.2
- erusev/parsedown: 1.7.1
- predis/predis: 1.1.1
Requires (Dev)
- php-coveralls/php-coveralls: ~2.1.0
- phpunit/phpunit: 7.0.2
- squizlabs/php_codesniffer: 3.2.3
- dev-master
- 3.0.x-dev
- 2.3.x-dev
- 2.3.0
- 2.2.x-dev
- 2.2.15
- 2.2.14
- 2.2.13
- 2.2.12
- 2.2.11
- 2.2.10
- 2.2.9
- 2.2.8
- 2.2.7
- 2.2.6
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.x-dev
- 1.2.90
- 1.2.89
- 1.2.88
- 1.2.87
- 1.2.86
- 1.2.85
- 1.2.84
- 1.2.83
- 1.2.82
- 1.2.81
- 1.2.80
- 1.2.79
- 1.2.78
- 1.2.77
- 1.2.76
- 1.2.75
- 1.2.74
- 1.2.73
- 1.2.72
- 1.2.71
- 1.2.70
- 1.2.69
- 1.2.68
- 1.2.67
- 1.2.66
- 1.2.65
- 1.2.64
- 1.2.63
- 1.2.62
- 1.2.61
- 1.2.60
- 1.2.59
- 1.2.58
- 1.2.57
- 1.2.56
- 1.2.55
- 1.2.54
- 1.2.53
- 1.2.52
- 1.2.51
- 1.2.50
- 1.2.49
- 1.2.48
- 1.2.47
- 1.2.46
- 1.2.45
- 1.2.44
- 1.2.43
- 1.2.42
- 1.2.41
- 1.2.40
- 1.2.39
- 1.2.38
- 1.2.37
- 1.2.36
- 1.2.35
- 1.2.34
- 1.2.33
- 1.2.32
- 1.2.31
- 1.2.30
- 1.2.29
- 1.2.28
- 1.2.27
- 1.2.26
- 1.2.25
- 1.2.24
- 1.2.23
- 1.2.22
- 1.2.21
- 1.2.20
- 1.2.19
- 1.2.18
- 1.2.17
- 1.2.16
- 1.2.15
- 1.2.14
- 1.2.13
- 1.2.12
- 1.2.11
- 1.2.10
- 1.2.9
- 1.2.8
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- 0.1.3
- 0.1.2
- 0.1.1
- 0.0.10
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-hotfix/helpers
- dev-feature/reports
- dev-hotfix/elastic
This package is auto-updated.
Last update: 2024-11-27 14:18:29 UTC
README
Schema, Model and Relation manager.
Install
If you already installed Cradle, you may not need to install this because it should be already included.
composer require cradlephp/cradle-system
$ bin/cradle cradlephp/cradle-system install
Schema
Schemas are similar to database tables, but with more definition. With schemas you can define field types, validation, output formats and indexing capabilities like searchable, filterable and sortable. Schemas are designed to be very flexible and explicit.
Schema Routes
The following routes are available in the admin.
GET /admin/system/schema/search
- Schema search pageGET /admin/system/schema/create
- Schema create formGET /admin/system/schema/update/:name
- Schema update formPOST /admin/system/schema/search
- Bulk action processorPOST /admin/system/schema/create
- Creates a schemaPOST /admin/system/schema/update/:name
- Updates a schemaGET /admin/system/schema/remove/:name
- Removes a SchemaGET /admin/system/schema/restore/:name
- Restores a Schema
Schema Events
system-schema-create
system-schema-detail
system-schema-remove
system-schema-restore
system-schema-update
Relation
A relation describes the link between 2 objects. Relations can be described by the following. Each relation type will have different sets of UI in the admin.
- 1:0 - one-to-one optionally
- 1:1 - one-to-one required
- 1:N - one-to-many
- N:N - many-to-many
Relation Routes
The following routes are available in the admin.
GET /admin/system/object/:schema1/:id/search/:schema2
- Relational Search PageGET /admin/system/object/:schema1/:id/create/:schema2
- Relational Create FormGET /admin/system/object/:schema1/:id/link/:schema2
- Relational Link FormPOST /admin/system/object/:schema1/:id/search/:schema2
- Bulk action processorPOST /admin/system/object/:schema1/:id/create/:schema2
- Creates an object and linksPOST /admin/system/object/:schema1/:id/link/:schema2
- Links an objectGET /admin/system/object/:schema1/:id1/link/:schema2/:id2
- Links an objectGET /admin/system/object/:schema1/:id1/unlink/:schema2/:id2
- Unlinks an objectGET /admin/system/object/:schema1/:id/export/:schema2/:type
- Exports object relationsGET /admin/system/object/:schema/:id/import/:schema2
- Imports object relations
The following routes are available in the front end.
GET /system/object/:schema1/:id/search/:schema2
- Relational Search PageGET /system/object/:schema1/:id/create/:schema2
- Relational Create FormGET /system/object/:schema1/:id/link/:schema2
- Relational Link FormPOST /system/object/:schema1/:id/search/:schema2
- Bulk action processorPOST /system/object/:schema1/:id/create/:schema2
- Creates an object and linksPOST /system/object/:schema1/:id/link/:schema2
- Links an objectGET /system/object/:schema1/:id1/link/:schema2/:id2
- Links an objectGET /system/object/:schema1/:id1/unlink/:schema2/:id2
- Unlinks an objectGET /system/object/:schema1/:id/export/:schema2/:type
- Exports object relationsGET /system/object/:schema/:id/import/:schema2
- Imports object relations
Relation Events
system-relation-link
system-relation-unlink
system-relation-unlinkall
Object
Objects are similar to database table rows but its functionality is mapped by the schema.
Object Routes
The following routes are available in the admin.
GET /admin/system/object/:schema/search
- Object search pageGET /admin/system/object/:schema/create
- Object create formGET /admin/system/object/:schema/update/:id
- Object update formPOST /admin/system/object/:schema/create
- Creates an objectPOST /admin/system/object/:schema/update/:id
- Updates an objectGET /admin/system/object/:schema/remove/:id
- Removes an objectGET /admin/system/object/:schema/restore/:id
- Restores an objectPOST /admin/system/object/:schema/import
- Imports objects via JSONGET /admin/system/object/:schema/export/:type
- Exports object to a given file type
The following routes are available in the front end.
GET /system/object/:schema/search
- Object search pageGET /system/object/:schema/create
- Object create formGET /system/object/:schema/update/:id
- Object update formPOST /system/object/:schema/create
- Creates an objectPOST /system/object/:schema/update/:id
- Updates an objectGET /system/object/:schema/remove/:id
- Removes an objectGET /system/object/:schema/restore/:id
- Restores an objectPOST /system/object/:schema/import
- Imports objects via JSONGET /system/object/:schema/export/:type
- Exports object to a given file type
Object Events
system-object-create
system-object-detail
system-object-remove
system-object-restore
system-object-update
Contributing to Cradle PHP
Thank you for considering to contribute to Cradle PHP.
Please DO NOT create issues in this repository. The official issue tracker is located @ https://github.com/CradlePHP/cradle/issues . Any issues created here will most likely be ignored.
Please be aware that master branch contains all edge releases of the current version. Please check the version you are working with and find the corresponding branch. For example v1.1.1
can be in the 1.1
branch.
Bug fixes will be reviewed as soon as possible. Minor features will also be considered, but give me time to review it and get back to you. Major features will only be considered on the master
branch.
- Fork the Repository.
- Fire up your local terminal and switch to the version you would like to contribute to.
- Make your changes.
- Always make sure to sign-off (-s) on all commits made (git commit -s -m "Commit message")
Making pull requests
- Please ensure to run phpunit and phpcs before making a pull request.
- Push your code to your remote forked version.
- Go back to your forked version on GitHub and submit a pull request.
- All pull requests will be passed to Travis CI to be tested. Also note that Coveralls is also used to analyze the coverage of your contribution.