2017 © Pedro Peláez
 

symfony-bundle admingenerator-generator-bundle

Admingenerator for Symfony2 based on YAML configuration and Twig templating

image

nitra/admingenerator-generator-bundle

Admingenerator for Symfony2 based on YAML configuration and Twig templating

  • Monday, October 6, 2014
  • by nitra
  • Repository
  • 15 Watchers
  • 0 Stars
  • 325 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 136 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

# Symfony2 Admin Generator

KnpBundles Badge project status build status Latest Stable Version Total Downloads, (*1)

The Real Missing Admin Generator for Symfony2!

This package is a Symfony2 Admin Generator based on YAML configuration and Twig templating. It's inspired by fzaninotto/Doctrine2ActiveRecord., (*2)

Follow us on Twitter!

Don't miss any updates from Symfony2 Admin Generator! Join Twitter today and follow us!, (*3)

Features:

  • Generate Views and Controllers for Models with one command
  • Configure all options in one (per model) YAML file
  • Includes standard actions: create/edit, show, delete, list/nestedset tree list
  • Flexible and extendable: you can easily add or overwrite almost everything!
  • Supports most popular model managers: Doctrine ORM, Doctrine ODM and Propel
  • Introduces nested forms: create/edit object and all it's associated objects in one form!
  • Manage relations one to one, one to many, many to one and many to many
  • Fully translatable: all field elements (labels, placeholders, helpers), all widgets, actions, error messages and titles
  • List features: sortable, paginated, filters, batch actions, scopes
  • Nestedset tree list features: drag&drop to manage your tree
  • New/Edit featues: fieldsets, tabbable, cool widgets for collection, file upload, date and entity fields
  • Translated into DE, EN (default), ES, FA, FR, GR, IT, JA, NL, PL, PT, RO, RU, SL, TR, UK (you can easily contribute to add your own)
  • Credentials for actions, columns and form fields
  • Complete admin design based on twitter bootstrap (see next section)
  • ... and more!

This bundle in pictures

Preview of list, (*4)

Preview of edit, (*5)

Preview of dashboard, (*6)

Important note

Documentation is currently being rewritten. Old documentation can be found in:, (*7)

Sorry for inconvenience, we will fix that as soon as possible!, (*8)

Installation

All the installation instructions are located in documentation., (*9)

Documentation

The documentation for this bundle is located in Resources/doc directory. Start by reading Table of contents., (*10)

Translations

If you wish to use default texts provided in this bundle, you have to make sure you have translator enabled in your config., (*11)

``` yaml, (*12)

app/config/config.yml

framework: translator: ~, (*13)


For more information about translations, check [Symfony documentation](http://symfony.com/doc/current/book/translation.html). ## Installation Installation is a 3 step process: 1. Download NitraThemeBundle using composer 2. Enable the Bundle 3. Configure the NitraThemeBundle ### Step 1: Download NitraThemeBundle using composer Add NitraThemeBundle in your composer.json: ```js { "require": { "nitra/admingenerator-generator-bundle": "2.3.*@dev" } }

Now tell composer to download the bundle by running the command:, (*14)

``` bash $ php composer.phar update nitra/admingenerator-generator-bundle, (*15)


Composer will install the bundle to your project's `vendor/nitra` directory. ### Step 2: Enable the bundle Enable the bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Knp\Bundle\MenuBundle\KnpMenuBundle(), new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(), new Admingenerator\GeneratorBundle\AdmingeneratorGeneratorBundle(), new Millwright\MenuBundle\MillwrightMenuBundle(), new Millwright\ConfigurationBundle\MillwrightConfigurationBundle(), new Genemu\Bundle\FormBundle\GenemuFormBundle(), new Pinano\Select2Bundle\PinanoSelect2Bundle(), new FOS\UserBundle\FOSUserBundle(), ); }

Step 3: Configure

Add the following configuration to your config.yml file according to which type of datastore you are using., (*16)

``` yaml, (*17)

app/config/config.yml

imports: - { resource: menu.yml } - { resource: ../../vendor/nitra/doctrine-behaviors/config/orm-services.yml }, (*18)

Assetic Configuration

assetic: debug: %kernel.debug% use_controller: false bundles: [ AdmingeneratorGeneratorBundle ] #java: /usr/bin/java filters: cssrewrite: ~ lessphp: ~, (*19)

Doctrine Configuration

doctrine: orm: filters: softdeleteable: class: Admingenerator\GeneratorBundle\Filter\SoftDeleteableFilter enabled: true hydrators: KeyPair: Admingenerator\GeneratorBundle\Hydrators\KeyPairHydrator, (*20)

FOS Configuration

fos_user: db_driver: orm # other valid values are 'mongodb' firewall_name: main user_class: Nitra\NitraThemeBundle\Entity\User, (*21)

Admingenerator Configuration

admingenerator_generator: base_admin_template: ::base_admin.html.twig use_doctrine_orm: true stylesheets: [] logout_path: fos_user_security_logout twig: use_localized_date: true use_form_resources: true date_format: 'Y-M-d' localized_date_format: 'medium' localized_datetime_format: 'medium' datetime_format: 'Y-m-d H:i'
number_format: decimal: 2 decimal_point: ',' thousand_separator: ' ', (*22)

Замена combobox на Select2

genemu_form: select2: enabled: true, (*23)

Add blameable listener

parameters: knp.doctrine_behaviors.blameable_listener.user_entity: Nitra\NitraThemeBundle\Entity\User
```, (*24)

The Versions