2017 © Pedro Peláez
 

symfony-bundle filepicker-bundle

Symfony Bundle for adding a file picker component to form inputs

image

evansmwendwa/filepicker-bundle

Symfony Bundle for adding a file picker component to form inputs

  • Saturday, January 13, 2018
  • by evansmwendwa
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

filepicker-bundle

Symfony Bundle for adding a file picker component to form inputs, (*1)

Warning: This package is at a very early stage of development. Use at your own risk

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:, (*2)

$ composer require evansmwendwa/filepicker-bundle "dev-master"

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

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:, (*4)

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Evans\FilepickerBundle\EvansFilepickerBundle(),
        );

        // ...
    }

    // ...
}

Step 3: Create config parameters

# app/config/config.yml
evans_filepicker:
    uploads_destination: '/uploads/images'
    allow_uploads: true
    allowed_mimes: ['image/jpeg','image/png','image/gif']
    group_files: false

Step 4: Register form theme in twig

# Twig Configuration
twig:
    form_themes:
        - EvansFilepickerBundle::form/fields.html.twig

Step 5: Load bundle assets in your Twig Template

The bundle provides two twig functions for loading the necessary HTML, CSS and JS. Add these functions somewhere in your twig template. Can be base in you base template if necessary, (*5)

# loads necessary html and js files
{{ file_picker_init() }}
# loads necessary css files
{{ file_picker_init_css() }}

Step 6: Register FilepickerBundle Routes

# app/config/routing.yml

evans_filepicker:
    resource: "@EvansFilepickerBundle/Resources/config/routing.yml"
    prefix:   /

Using the built in CKE Editor Plugin

Instructions coming soon, (*6)

Using File picker bundle with Symfony EasyAdminBundle

Instructions coming soon, (*7)

The Versions

13/01 2018

dev-master

9999999-dev

Symfony Bundle for adding a file picker component to form inputs

  Sources   Download

MIT

The Requires

 

form symfony2 bundle editor picker media wysiwyg filepicker ivorycke sumfony3

13/01 2018

dev-develop

dev-develop

Symfony Bundle for adding a file picker component to form inputs

  Sources   Download

MIT

The Requires

 

form symfony2 bundle editor picker media wysiwyg filepicker ivorycke sumfony3