fsi-open / datasource-bundle

Main purpose of this bundle is to register FSi DataSource Component service and twig datasource rendering functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Set default configuration

norberttech opened this issue · comments

At the momment after bundle registration we need to add something like this into app configuration:

fsi_data_source:
     twig: ~

We can avoid it chanigin following lines in file datasource-bundle/DependencyInjection Configuration.php

# line 28 - 31
                ->arrayNode('twig')
                    ->treatFalseLike(array('enabled' => false))
                    ->treatTrueLike(array('enabled' => true))
                    ->treatNullLike(array('enabled' => true))

into:

                ->arrayNode('twig')
                    ->addDefaultsIfNotSet()

After this simple modification twig will be used by default.