2017 © Pedro Peláez
 

symfony-bundle files_finder_bundle

image

massmedia/files_finder_bundle

  • Saturday, March 5, 2016
  • by Daegon
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Files finder

Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*1)

$ composer require massmedia/files_finder_bundle 

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*2)

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:, (*3)

<?php
    // app/AppKernel.php

    // ...
    class AppKernel extends Kernel
    {
        public function registerBundles()
        {
            $bundles = array(
                // ...
                new JMS\SerializerBundle\JMSSerializerBundle(),
                new FOS\RestBundle\FOSRestBundle(),
                new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
                new Massmedia\FilesFinderBundle\FilesFinderBundle(),
                new Bazinga\Bundle\RestExtraBundle\BazingaRestExtraBundle(),
            );

            // ...
        }

        // ...
    }

Step 2: Configure

Routes file:, (*4)

# app/config/routing.yml
NelmioApiDocBundle:
  resource: "@NelmioApiDocBundle/Resources/config/routing.yml"
  prefix:   /api/doc

Configure rest:, (*5)

# app/config/config.yml
fos_rest:
    param_fetcher_listener: true
    body_listener: true
    view:
        view_response_listener: 'force'
    format_listener:
        rules:
            - { path: ^/api, priorities: [ json ], fallback_format: json, prefer_extension: true }
            - { path: '^/', priorities: [ 'html', '*/*'], fallback_format: ~, prefer_extension: true }

The Versions