Download the PHP package omouren/document-id-form-bundle without Composer
On this page you can find all versions of the php package omouren/document-id-form-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download omouren/document-id-form-bundle
More information about omouren/document-id-form-bundle
Files in omouren/document-id-form-bundle
Package document-id-form-bundle
Short Description Provides the "document_id" form type
License
Informations about the package document-id-form-bundle
DocumentIdFormBundle
Provides the form type "document_id" using Doctrine ODM. Based on the work of Gregwar : FormBundle
Installation
composer require omouren/document-id-form-bundle
.
Register the bundle in the application kernel :
Add the following after the twig block to the configuration :
# app/config/config.yml
# Twig Configuration
twig:
...
form_themes:
- 'OmourenDocumentIdFormBundle::document_id_type.html.twig'
Usage
The document_id is a field that contains an document id, this assumes you set up javascripts or any UI logics to fill it programmatically.
The usage look like the document field type one, except that the query returns one unique result. One example :
Here ->find($value)
will be used.
You can also chose to show the field, by passing the hidden
option to false
:
Using the property
option, you can also use another identifier than the primary key:
All versions of document-id-form-bundle with dependencies
symfony/form Version ~2.3
symfony/validator Version ~2.3
symfony/property-access Version ~2.3
doctrine/mongodb Version ^1.0