composer require cedriclombardot/admingenerator-generator-bundle:~1.0
composer require cedriclombardot/admingenerator-generator-bundle:~1.1
Edit your composer.json
config and add:
"config": {
"component-dir": "web/components"
},
Then run composer update
command.
Note: If you're getting no matching package found error then you must also add
"minimum-stability": "dev"
to your composer.json file.
Admingenerator has a dependency on KnpMenuBundle and WhiteOctroberPagerfantaBundle.
Note: there are also some optional dependencies, each is described in corresponding feature`s doc. This guide describes only the minimal-setup.
Enable Admingenerator and its dependencies in your app/AppKernel.php
:
<?php
public function registerBundles()
{
$bundles = array(
// ...
new Admingenerator\GeneratorBundle\AdmingeneratorGeneratorBundle(),
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
);
}
Choose your model manager and choose basic admingenerator template - with or without assetic. -- add following lines to app/config/config.yml
:
admingenerator_generator:
# choose and enable at least one
use_propel: true
use_doctrine_orm: true
use_doctrine_odm: false
# choose and uncomment only one
# base_admin_template: AdmingeneratorGeneratorBundle::base_admin.html.twig
# base_admin_template: AdmingeneratorGeneratorBundle::base_admin_assetic_less.html.twig
By default, the base_admin.html.twig
uses YUI Compressor to minify assets and combine them into one file (less HTTP requests).
In order to properly install and configure YUI Compressor follow this article
See also Asset Management cookbook entry.
To install assets in your web directory run:
php app/console assets:install web --symlink
Note: We recommend installing assets with
--symlink
option, however you may skip this option if you wish to hard copy assets.
If you're useing assetic for asset management dump your assets by running:
php app/console assetic:dump
By default brand text ("Dashboard") is disabled. To link it with your Dashboard
add dashboard_welcome_path
under admingenerator_generator
in your app/config/config.yml
:
admingenerator_generator:
dashboard_welcome_path: MyDashboard_path