symposium/event-bundle

Symfony EventBundle

This package's canonical repository appears to be gone and the package has been frozen as a result.

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Type:symfony-bundle

dev-master 2015-09-10 09:05 UTC

This package is auto-updated.

Last update: 2019-02-27 16:58:12 UTC


README

An Event Bundle for Symfony2

Requirements

Composer

Installation

To install this bundle please follow the next steps: First add the dependencies to your composer.json file:

"require":{
    ...
    "symposium/event-bundle": "dev-master",
    "friendsofsymfony/user-bundle": "~2.0@dev",
    "stof/doctrine-extensions-bundle": "~1.1@dev",
    "friendsofsymfony/rest-bundle":"1.7.*",
    "jms/serializer-bundle":"~1.0"
    ...
}

Enable the bundle in your application kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Symposium\Bundle\EventBundle\SymposiumEventBundle(),
        new FOS\UserBundle\FOSUserBundle(),
        new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
        new FOS\RestBundle\FOSRestBundle(),
        new JMS\SerializerBundle\JMSSerializerBundle(),
    );
}

Import the routing of the bundle:

# app/config/routing.yml

fos_user:
    resource: "@FOSUserBundle/Resources/config/routing/all.xml"

sp_event:
    resource: "@SymposiumEventBundle/Resources/config/routing.yml"
    type:     rest

Then import the bundle configuration:

# app/config/config.yml

imports:
    - { resource: @SymposiumEventBundle/Resources/config/config.yml }
    - { resource: @SymposiumEventBundle/Resources/config/security.yml }
    - { resource: @SymposiumEventBundle/Resources/config/services.yml }

Then add the security configuration:

# app/config/security.yml

security:
    providers:
        in_memory:
            memory: ~
        fos_userbundle:
            id: fos_user.user_provider.username

Finally install the bundle with the command:

composer update

You can access to the route /Entity/ (where Entity is one of the entity in Entity folder).