Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alterphp/easyadminmongoodmbundle
Provides support of Doctrine ODM documents in EasyAdmin
https://github.com/alterphp/easyadminmongoodmbundle
Last synced: 3 months ago
JSON representation
Provides support of Doctrine ODM documents in EasyAdmin
- Host: GitHub
- URL: https://github.com/alterphp/easyadminmongoodmbundle
- Owner: alterphp
- License: mit
- Created: 2018-09-05T08:25:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-09-02T15:29:07.000Z (over 2 years ago)
- Last Synced: 2024-09-18T18:11:36.110Z (4 months ago)
- Language: PHP
- Size: 127 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EasyAdminMongoOdmBundle
Provides support of Doctrine Mongo ODM documents in EasyAdmin
:warning: This bundle is under development and __remains experimental__ as long as no v1.0.0 tag is available !
## Installation
EasyAdminMongoOdmBundle is installable aside an EasyAdmin configuration. It actually requires it !
`composer require alterphp/easyadmin-mongo-odm-bundle:dev-master`
## Configuration
Simple example :
```yaml
easy_admin_mongo_odm:
documents:
AnyDocument:
class: App\Document\AnyDocument
SomeDocument:
class: App\Document\SomeDocument
list:
sort: createdAt
fields:
- field1
- field2
- ...# You can define menu for documents into easyadmin configuration
easy_admin:
design:
menu:
- { label: AnyDocument, route: easyadmin_mongo_odm, params: { document: AnyDocument } }
- { label: SomeDocument, route: easyadmin_mongo_odm, params: { document: SomeDocument } }
```## Dev notes
* TwigPathPass compiler pass makes @EasyAdminMongoOdm templates to be searched in EasyAdmin bundle if not found in EasyAdminMongoOdm bundle.
## TODOs
* Exception listener for production env ?
* QueryBuilder => deal with associations ?
* PropertyConfigPass is not implemented => item `format` per field is not preset
* Menu items of type `document`## Development tags
__USE_MAIN_CONFIG__ : Some backend configuration used from EasyAdmin bundle (when not specific to ODM).
__RESTRICTED_ACTIONS__ : Marks code lines that deal with actions limitation (new, edit and delete are not available for now).
__NO_ASSOCIATION__ : Disabled association mapping (Mongo ODM has `reference` feature, but it's not implemented here yet).
__SORT_ONLY_INDEXES__ : By default, only indexed fields are sortable (for performance reason).