Admin Theme based on the AdminLTE Template for easy integration into symfony
Clone or download
Permalink
Failed to load latest commit information.
.github <feature> Add operating system to issue report Mar 2, 2018
Command <feature> Detect OS version for uglify binaries. Issue #192 Oct 27, 2017
Composer Update hint accordinly for new composer Sep 17, 2017
Controller <feature> Improve docs about theme events and remove events not used Oct 22, 2017
DependencyInjection Improve bower detection on install. Fix issue #231 Mar 2, 2018
Event <feature> Update php code doc for notifications Nov 2, 2017
EventListener <feature> Apply php-cs-fixer to new code Oct 22, 2017
Form <feature> Remove useless FormHelpExtension. Issue #165 Oct 22, 2017
Helper <feature> Apply php-cs-fixer to new code Oct 22, 2017
Menu Apply PSR2 single_blank_line_before_namespace php cs fixer Sep 17, 2017
Model Apply PHP CS Fixer to new commits Sep 17, 2017
Resources <hotfix> Prefix fontawesome to 4.x versions and avoid 5.0 changes Feb 19, 2018
Routing Avoid undefined index notices for unexistant route alias. Issue #179 Sep 28, 2017
Theme Apply PSR2 single_quote php cs fixer Sep 17, 2017
Twig fixed classname for the boxed layout Jan 15, 2018
Util Apply PSR2 single_blank_line_before_namespace php cs fixer Sep 17, 2017
.gitignore Ignore composer.lock and vendor folder Sep 17, 2017
.php_cs Add .php_cs config to php cs fixer Sep 17, 2017
.travis.yml Add initial travis config Sep 27, 2017
AvanzuAdminThemeBundle.php Apply PSR2 no_unused_imports php cs fixer Sep 17, 2017
LICENSE Add MIT license based in composer spec Nov 2, 2017
README.md Update initialize command. Issue #192 Nov 7, 2017
composer.json Update composer.json Sep 27, 2017

README.md

AdminThemeBundle knpbundles.com

PRs Welcome Symfony 2.x & 3.x Build Status Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

Throughput Graph

Admin Theme based on the AdminLTE Template for easy integration into symfony. This bundle integrates several commonly used javascripts and the awesome AdminLTE Template.

Installation

Installation using composer is really easy: this command will add "avanzu/admin-theme-bundle": "~1.3" to your composer.json and will download the bundle:

   php composer.phar require avanzu/admin-theme-bundle

Notice: if you prefer to stay with the AdminLTE theme v1.x, manually reference "avanzu/admin-theme-bundle": "~1.1" in composer.json "require" part and run php composer.phar update

For unstable releases (based in master branch) use:

   php composer.phar avanzu/admin-theme-bundle dev-master

Enable the bundle in your kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
	$bundles = array(
		// ...
		new Avanzu\AdminThemeBundle\AvanzuAdminThemeBundle(),
	);
}

If you use 2.x branch or dev-master version of this bundle you need additionally:

php bin/console avanzu:admin:initialize

Install assets (preferably using symlink method but hardcopy works as well)...

	php app/console assets:install --symlink

Or symfony 3.x/4.x version:

	php bin/console assets:install --symlink

... and fetch vendors:

	php app/console avanzu:admin:fetch-vendor

Or symfony 3.x/4.x version:

	php bin/console avanzu:admin:fetch-vendor

Additionaly, you can trigger fetch the vendor in each install or update of this bundle, for that edit your archive composer.json and add:

    "scripts": {
        "post-install-cmd": [
            "Avanzu\\AdminThemeBundle\\Composer\\ScriptHandler::fetchThemeVendors"
        ],
        "post-update-cmd": [
            "Avanzu\\AdminThemeBundle\\Composer\\ScriptHandler::fetchThemeVendors"
        ]
    } 

Symfony 2.8 notice

This bundle requires assetic, but it isn't shipped with symfony anymore since version 2.8. To install assetic, follow these steps:

php composer.phar require symfony/assetic-bundle

Enable the bundle in your kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
	$bundles = array(
		// ...
		new Symfony\Bundle\AsseticBundle\AsseticBundle(),
	);
}

Add the following lines at app/config/config_dev.yml:

assetic:
    use_controller: false

Changing default values from templates

If you want to change any default value as for example admin_skin all you need to do is define the same at app/config/config.yml under [twig] section. See example below:

# Twig Configuration
twig:
    debug:            "%kernel.debug%"
    strict_variables: "%kernel.debug%"
    globals:
        admin_skin: skin-blue

You could also define those values at app/config/parameters.yml:

admin_skin: skin-blue

and then use as follow in app/config/config.yml:

# Twig Configuration
twig:
    debug:            "%kernel.debug%"
    strict_variables: "%kernel.debug%"
    globals:
        admin_skin: "%admin_skin%"

AdminLTE skins are: skin-blue (default for this bundle), skin-blue-light, skin-yellow, skin-yellow-light, skin-green, skin-green-light, skin-purple, skin-purple-light, skin-red, skin-red-light, skin-black and skin-black-light. If you want to know more then go ahead and check docs for AdminLTE here.

There are a few values you could change for sure without need to touch anything at bundle, just take a look under Resources/views. That's all.

Upgrade notice

Version >= 1.3 comes with pre packaged asset files located under Resources/public/static/[prod|dev]. So, there is no longer a strict requirement for bower and/or assetic. The assetic groups hovever, are still there and should work as usual.

If the assetic bundle is installed but you don't want the AdminThemeBundle to use it you can add following lines to config.yml:

    avanzu_admin_theme:
        use_assetic: false

Next Steps