for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\SeoBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files.
class Configuration implements ConfigurationInterface
{
* {@inheritdoc}
public function getConfigTreeBuilder()
$treeBuilder = new TreeBuilder();
$treeBuilder->root('sonata_seo')
->children()
->scalarNode('encoding')->defaultValue('UTF-8')->end()
->arrayNode('page')
->addDefaultsIfNotSet()
->scalarNode('default')->defaultValue('sonata.seo.page.default')->end()
->arrayNode('head')
->normalizeKeys(false)
->useAttributeAsKey('attribute')
->prototype('scalar')->end()
->end()
->arrayNode('metas')
->useAttributeAsKey('element')
->prototype('array')
->useAttributeAsKey('name')
->scalarNode('separator')->defaultValue(' - ')->end()
->scalarNode('title')->defaultValue('Sonata Project')->end()
->arrayNode('sitemap')
->arrayNode('doctrine_orm')
->prototype('variable')->end()
->arrayNode('services')
;
return $treeBuilder;
}