idci/document-management-bundle

Symfony bundle to handle document management features like storage, pdf generation

v1.1.7 2019-04-30 18:18 UTC

This package is auto-updated.

Last update: 2024-10-29 04:31:13 UTC


README

DocumentManagementBundle is a Symfony bundle to manage documents like pdf generation, storage, DMS.

Installation

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.

Tests

Install bundle dependencies:

$ make composer-update

To execute unit tests:

$ make phpunit

To execute functional tests:

$ make phpunit-functional