DocumentManagementBundle is a Symfony bundle to manage documents like pdf generation, storage, DMS.
Add dependencies in your composer.json
file:
"require": {
...
"idci/document-management-bundle": "~1.0"
},
Install these new dependencies in your application using composer:
$ make composer-update
Register needed bundles in your application kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new FOS\RestBundle\FOSRestBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new Knp\Bundle\SnappyBundle\KnpSnappyBundle(),
new IDCI\Bundle\DocumentManagementBundle\IDCIDocumentManagementBundle(),
);
}
Import the bundle configuration:
# app/config/config.yml
imports:
- { resource: @IDCIDocumentManagementBundle/Resources/config/config.yml }
Import the bundle routing:
# app/config/routing.yml
idci_document_api:
resource: "@IDCIDocumentManagementBundle/Resources/config/routing.yml"
prefix: /api
Define the binary path for wkhtmltopdf:
# app/config/parameters.yml
parameters:
document_management_snappy_pdf_binary_path: '%kernel.root_dir%/../bin/wkhtmltopdf'
That's it, you are ready to use it.
Install bundle dependencies:
$ make composer-update
To execute unit tests:
$ make phpunit
To execute functional tests:
$ make phpunit-functional