diff --git a/ChillPersonBundle.php b/ChillPersonBundle.php index e9af99885..18bf8fb79 100644 --- a/ChillPersonBundle.php +++ b/ChillPersonBundle.php @@ -13,8 +13,8 @@ class ChillPersonBundle extends Bundle { parent::build($container); - //$container->getExtension('chill_main') - // ->addWidgetFactory(new PersonListWidgetFactory()); + $container->getExtension('chill_main') + ->addWidgetFactory(new PersonListWidgetFactory()); $container->addCompilerPass(new AccompanyingPeriodTimelineCompilerPass()); } diff --git a/DependencyInjection/ChillPersonExtension.php b/DependencyInjection/ChillPersonExtension.php index bd20b795b..b9f17a1c5 100644 --- a/DependencyInjection/ChillPersonExtension.php +++ b/DependencyInjection/ChillPersonExtension.php @@ -136,17 +136,6 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac $this->prependHomepageWidget($container); $this->prependDoctrineDQL($container); $this->prependCruds($container); - - $bundles = $container->getParameter('kernel.bundles'); - //add ChillMain to assetic-enabled bundles - if (!isset($bundles['AsseticBundle'])) { - throw new MissingBundleException('AsseticBundle'); - } - - $asseticConfig = $container->getExtensionConfig('assetic'); - $asseticConfig['bundles'][] = 'ChillPersonBundle'; - $container->prependExtensionConfig('assetic', - array('bundles' => array('ChillPersonBundle'))); //add person_fields parameter as global $chillPersonConfig = $container->getExtensionConfig($this->getAlias()); diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index ccf0fc7b5..9784e8523 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -21,8 +21,8 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('cl_chill_person'); + $treeBuilder = new TreeBuilder('cl_chill_person'); + $rootNode = $treeBuilder->getRootNode('cl_chill_person'); $rootNode ->canBeDisabled() @@ -115,8 +115,8 @@ class Configuration implements ConfigurationInterface private function addFieldNode($key) { - $tree = new TreeBuilder(); - $node = $tree->root($key, 'enum'); + $tree = new TreeBuilder($key,'enum'); + $node = $tree->getRootNode($key); switch($key) { case 'accompanying_period': @@ -128,9 +128,9 @@ class Configuration implements ConfigurationInterface } $node - ->values(array('hidden', 'visible')) - ->defaultValue('visible') - ->info($info) + ->values(array('hidden', 'visible')) + ->defaultValue('visible') + ->info($info) ->end(); return $node; diff --git a/Resources/translations/messages.fr.yml b/Resources/translations/messages.fr.yml index b2fe057f4..d8bdef57a 100644 --- a/Resources/translations/messages.fr.yml +++ b/Resources/translations/messages.fr.yml @@ -104,7 +104,6 @@ Person search results by phonenumber: Recherche de personnes par numéro de tél 'Close accompanying period': 'Clôre la période' 'Open accompanying period': 'Ouvrir la période' 'Add an accompanying period in the past': Ajouter une période d'accompagnement dans le passé -The period has been re-opened: La période a été ré-ouverte Begin a new accompanying period: Commencer une nouvelle période d'accompagnement Create an accompanying period: Créer une période d'accompagnement 'A period has been created.': Une période d'accompagnement a été créée.