2017 © Pedro Peláez
 

symfony-bundle toolkit-bundle

Toolkit Bundle provides basic usefully functional used in most projects

image

lazyants/toolkit-bundle

Toolkit Bundle provides basic usefully functional used in most projects

  • Tuesday, November 4, 2014
  • by lazyants
  • Repository
  • 2 Watchers
  • 0 Stars
  • 12,248 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 3 Versions
  • 6 % Grown

The README.md

LazyantsToolkitBundle

This bundle provides some of functionality used by a part of our projects, (*1)

Installation

First you need to add lazyants/ToolkitBundle to composer.json:, (*2)

{
    require: {
        ...
        "lazyants/toolkit-bundle": "dev-master"
    }
}

or direct via composer.phar:, (*3)

./composer.phar require lazyants/ToolkitBundle:dev-master

You also have to add LazyantsToolkitBundle to your AppKernel.php:, (*4)

// app/AppKernel.php
...
class AppKernel extends Kernel
{
    ...
    public function registerBundles()
    {
        $bundles = array(
            ...
            new Lazyants\ToolkitBundle\LazyantsToolkitBundle()
        );
        ...

        return $bundles;
    }
    ...
}

Base template

LazyantsToolkitBundle::base.html.twig provides some abstract blocks, so you can you use it in your main layout, otherwise you will create probably the same structure anyway., (*5)

{% extends 'LazyantsToolkitBundle::base.html.twig' %}

Commands

Translation update command

To extract translations automatically for given bundles and locales (and delete duplicated fos user translations):, (*6)

Sample configuration:

# app/config/config.yml
lazyants_toolkit:
    translation:
        bundles: [ 'FrontendBundle', 'BackendBundle' ]
        locales: [ 'de', 'en' ]

Command:

./app/console lazyants:translation:update

Generate manager

To generate manager (controller, view and form):, (*7)

Command:

./app/console lazyants:generate:manager --entity=ENTITY_NAME

Arguments:

--entity: Mandatory value. The entity class name to initialize (shortcut notation), (*8)

--overwrite: Optional value. Do not stop the generation if crud controller already exist, thus overwriting all generated files, (*9)

--actions: Optional value. List of actions in controller. You will need this option on order to add new methods to controller or remove some from it. Multiple value are possible, f.e.: --actions=index --actions=add --actions=manage --actions=delete, (*10)

Customization:

In order to customize generated content, copy ToolkitBundle/Resources/skeleton into app/Resources/LazyantsDoctrineManager/skeleton or YOUR_BUNDLE/Resources/LazyantsDoctrineManager/skeleton. You can now customize controller, views or form. For actions without own view (by default there ist two - new and delete) simply don't create view files. Actions will be still created, if they are present in controller template and provided with --actions. In case of adding new actions or removing some of existing, you should always provide this argument., (*11)

Bitdeli Badge, (*12)

The Versions

04/11 2014

dev-master

9999999-dev https://github.com/lazyants/ToolkitBundle

Toolkit Bundle provides basic usefully functional used in most projects

  Sources   Download

MIT

The Requires

 

The Development Requires

by Maxim Spivakovsky

bundle toolkit

22/08 2013

v0.2

0.2.0.0 https://github.com/lazyants/ToolkitBundle

Toolkit Bundle provides basic usefully functional used in most projects

  Sources   Download

MIT

The Requires

 

The Development Requires

by Maxim Spivakovsky

bundle toolkit

12/08 2013

v0.1

0.1.0.0 https://github.com/lazyants/ToolkitBundle

Toolkit Bundle provides basic usefully functional used in most projects

  Sources   Download

MIT

The Requires

 

The Development Requires

by Maxim Spivakovsky

bundle toolkit