for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Superdesk Web Publisher Content Bundle.
*
* Copyright 2016 Sourcefabric z.ú. and contributors.
* For the full copyright and license information, please see the
* AUTHORS and LICENSE files distributed with this source code.
* @copyright 2016 Sourcefabric z.ú
* @license http://www.superdesk.org/license
*/
namespace SWP\Bundle\RuleBundle\DependencyInjection;
use SWP\Bundle\RuleBundle\Doctrine\ORM\RuleRepository;
use SWP\Component\Rule\Model\Rule;
use SWP\Component\Storage\Factory\Factory;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface
{
* {@inheritdoc}
public function getConfigTreeBuilder()
$treeBuilder = new TreeBuilder();
$treeBuilder->root('swp_rule')
->children()
->arrayNode('persistence')
->addDefaultsIfNotSet()
->arrayNode('orm')
->canBeEnabled()
->arrayNode('classes')
->arrayNode('rule')
->scalarNode('model')->cannotBeEmpty()->defaultValue(Rule::class)->end()
->scalarNode('repository')->defaultValue(RuleRepository::class)->end()
->scalarNode('factory')->defaultValue(Factory::class)->end()
->scalarNode('object_manager_name')->defaultValue(null)->end()
->end()
->end();
return $treeBuilder;
}