From 24d1f1e80b006d20a29b0f7906bf796ff2fe745c Mon Sep 17 00:00:00 2001 From: Julien Maulny Date: Mon, 11 Aug 2014 10:22:42 +0200 Subject: [PATCH] Add ClankBundle to assetic bundle automatically by dependency injection --- DependencyInjection/ClankExtensionClass.php | 4 ++++ README.md | 15 ++------------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/DependencyInjection/ClankExtensionClass.php b/DependencyInjection/ClankExtensionClass.php index 989b06e..c3f55e3 100644 --- a/DependencyInjection/ClankExtensionClass.php +++ b/DependencyInjection/ClankExtensionClass.php @@ -27,6 +27,10 @@ public function load(array $configs, ContainerBuilder $container) $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.xml'); + + $aAsseticBundle = $container->getParameter('assetic.bundles'); + $aAsseticBundle[] = 'JDareClankBundle'; + $container->setParameter('assetic.bundles', $aAsseticBundle); $config = array(); foreach ($configs as $subConfig) { diff --git a/README.md b/README.md index 691fb06..93374b2 100644 --- a/README.md +++ b/README.md @@ -62,18 +62,7 @@ public function registerBundles() } ``` -###Step 3: Add to Assetic Bundles - -Add "JDareClankBundle" to your assetic bundles in app/config (this is required to render the client side code). - -```yaml -# Assetic Configuration -assetic: - ... - bundles: [ JDareClankBundle ] -``` - -###Step 4: Configure WebSocket Server +###Step 3: Configure WebSocket Server Add the following to your app/config.yml @@ -87,7 +76,7 @@ clank: _Note: when connecting on the client, if possible use the same values as here to ensure compatibility for sessions etc._ -### Step 5: Launching the Server +### Step 4: Launching the Server The Server Side Clank installation is now complete. You should be able to run this from the root of your symfony installation.