2017 © Pedro Peláez
 

symfony-bundle basebundle

Base bundle for Symfony2

image

bluebear/basebundle

Base bundle for Symfony2

  • Friday, February 5, 2016
  • by JohnKrovitch
  • Repository
  • 6 Watchers
  • 1 Stars
  • 2,463 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

BaseBundle

BaseBundle for Symfony2 projects. This bundle contains some shortcuts and code snippets to ease Symfony2 projects developpment., (*1)

Installation

php composer.phar require bluebear/basebundle

Getting started

BaseBundle offers some features to help you :, (*2)

ControllerTrait

<?php
...
use BlueBear\BaseBundle\Behavior\ControllerTrait;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class MyController extends Controller {
    use ControllerTrait;

    ...

Your controller should have following methods (those methods are native in Symfony Controller):, (*3)

public function createNotFoundException($message = 'Not Found', Exception $previous = null)
public function generateUrl($route, $parameters = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) 

ControllerTrait has following methods : * forward404Unless($condition, $message = '404 Not Found') : Forward current request to a 404 page if $condition is false * redirect($url, $status = 302) : Redirect to an url or a route (for route use "@my_route") * setMessage($message, $type = 'info', $parameters = []) : Add a flash message with a type and translations parameters * getConfig($key) : Return configuration key $key from container parameters * getRouting() : Return router service * getTranslator() : Return translator service * getSession() : Return session service * getEventDispatcher() : Return event dispatcher service * getEntityManager() : Return entity manager service * translate($string, $parameters = []) : Return entity manager service, (*4)

ContainerTrait

ContainerTrait has following methods :, (*5)

  • getContainer() : Return Container service
  • setContainer() : Set Container service

EntityManagerTrait

EntityManagerTrait has following methods :, (*6)

  • getEntityManager() : Return EntityManager service
  • setEntityManager() : Set EntityManager service

ManagerTrait

..., (*7)

The Versions

05/02 2016

dev-master

9999999-dev https://github.com/CleverGaming/BaseBundle

Base bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Avatar JohnKrovitch
by JohanDufour
by Avatar VincentChalnot

symfony2 base shortcut

30/01 2016

0.2.3

0.2.3.0 https://github.com/CleverGaming/BaseBundle

Base bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Avatar JohnKrovitch
by JohanDufour
by Avatar VincentChalnot

symfony2 base shortcut

24/10 2015

0.2.2

0.2.2.0 https://github.com/CleverGaming/BaseBundle

Base bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Avatar JohnKrovitch
by JohanDufour
by Avatar VincentChalnot

symfony2 base shortcut

23/10 2015

v0.2.1

0.2.1.0 https://github.com/CleverGaming/BaseBundle

Base bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Avatar JohnKrovitch
by JohanDufour
by Avatar VincentChalnot

symfony2 base shortcut

27/06 2015

dev-0.2-dev

dev-0.2-dev https://github.com/CleverGaming/BaseBundle

Base bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Avatar JohnKrovitch
by JohanDufour
by Avatar VincentChalnot

symfony2 base shortcut

27/06 2015

v0.2

0.2.0.0 https://github.com/CleverGaming/BaseBundle

Base bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Avatar JohnKrovitch
by JohanDufour
by Avatar VincentChalnot

symfony2 base shortcut

15/03 2015

v0.1

0.1.0.0 https://github.com/CleverGaming/BaseBundle

Base bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Avatar JohnKrovitch
by JohanDufour
by Avatar VincentChalnot

symfony2 base shortcut