mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 21:13:57 +00:00
sf4, adding require symfony/templating + fix treebuilder depreciation
This commit is contained in:
@@ -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());
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user