| @@ 29-69 (lines=41) @@ | ||
| 26 | * |
|
| 27 | * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} |
|
| 28 | */ |
|
| 29 | class Configuration implements ConfigurationInterface |
|
| 30 | { |
|
| 31 | /** |
|
| 32 | * {@inheritdoc} |
|
| 33 | */ |
|
| 34 | public function getConfigTreeBuilder() |
|
| 35 | { |
|
| 36 | $treeBuilder = new TreeBuilder('swp_analytics'); |
|
| 37 | $treeBuilder->getRootNode() |
|
| 38 | ->children() |
|
| 39 | ->arrayNode('persistence') |
|
| 40 | ->addDefaultsIfNotSet() |
|
| 41 | ->children() |
|
| 42 | ->arrayNode('orm') |
|
| 43 | ->addDefaultsIfNotSet() |
|
| 44 | ->canBeEnabled() |
|
| 45 | ->children() |
|
| 46 | ->arrayNode('classes') |
|
| 47 | ->addDefaultsIfNotSet() |
|
| 48 | ->children() |
|
| 49 | ->arrayNode('article_statistics') |
|
| 50 | ->addDefaultsIfNotSet() |
|
| 51 | ->children() |
|
| 52 | ->scalarNode('model')->cannotBeEmpty()->defaultValue(ArticleStatistics::class)->end() |
|
| 53 | ->scalarNode('repository')->defaultValue(EntityRepository::class)->end() |
|
| 54 | ->scalarNode('factory')->defaultValue(Factory::class)->end() |
|
| 55 | ->scalarNode('interface')->defaultValue(ArticleStatisticsInterface::class)->end() |
|
| 56 | ->scalarNode('object_manager_name')->defaultValue(null)->end() |
|
| 57 | ->end() |
|
| 58 | ->end() |
|
| 59 | ->end() // children |
|
| 60 | ->end() // classes |
|
| 61 | ->end() |
|
| 62 | ->end() |
|
| 63 | ->end() |
|
| 64 | ->end() |
|
| 65 | ->end(); |
|
| 66 | ||
| 67 | return $treeBuilder; |
|
| 68 | } |
|
| 69 | } |
|
| 70 | ||
| @@ 26-66 (lines=41) @@ | ||
| 23 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
|
| 24 | use Symfony\Component\Config\Definition\ConfigurationInterface; |
|
| 25 | ||
| 26 | class Configuration implements ConfigurationInterface |
|
| 27 | { |
|
| 28 | /** |
|
| 29 | * {@inheritdoc} |
|
| 30 | */ |
|
| 31 | public function getConfigTreeBuilder() |
|
| 32 | { |
|
| 33 | $treeBuilder = new TreeBuilder('swp_redirect_route'); |
|
| 34 | $treeBuilder->getRootNode() |
|
| 35 | ->children() |
|
| 36 | ->arrayNode('persistence') |
|
| 37 | ->addDefaultsIfNotSet() |
|
| 38 | ->children() |
|
| 39 | ->arrayNode('orm') |
|
| 40 | ->addDefaultsIfNotSet() |
|
| 41 | ->canBeEnabled() |
|
| 42 | ->children() |
|
| 43 | ->arrayNode('classes') |
|
| 44 | ->addDefaultsIfNotSet() |
|
| 45 | ->children() |
|
| 46 | ->arrayNode('redirect_route') |
|
| 47 | ->addDefaultsIfNotSet() |
|
| 48 | ->children() |
|
| 49 | ->scalarNode('model')->cannotBeEmpty()->defaultValue(RedirectRoute::class)->end() |
|
| 50 | ->scalarNode('repository')->defaultValue(EntityRepository::class)->end() |
|
| 51 | ->scalarNode('factory')->defaultValue(Factory::class)->end() |
|
| 52 | ->scalarNode('interface')->defaultValue(RedirectRouteInterface::class)->end() |
|
| 53 | ->scalarNode('object_manager_name')->defaultValue(null)->end() |
|
| 54 | ->end() |
|
| 55 | ->end() |
|
| 56 | ->end() |
|
| 57 | ->end() |
|
| 58 | ->end() |
|
| 59 | ->end() |
|
| 60 | ->end() |
|
| 61 | ->end() |
|
| 62 | ; |
|
| 63 | ||
| 64 | return $treeBuilder; |
|
| 65 | } |
|
| 66 | } |
|
| 67 | ||
| @@ 24-64 (lines=41) @@ | ||
| 21 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
|
| 22 | use Symfony\Component\Config\Definition\ConfigurationInterface; |
|
| 23 | ||
| 24 | class Configuration implements ConfigurationInterface |
|
| 25 | { |
|
| 26 | /** |
|
| 27 | * {@inheritdoc} |
|
| 28 | */ |
|
| 29 | public function getConfigTreeBuilder() |
|
| 30 | { |
|
| 31 | $treeBuilder = new TreeBuilder('swp_rule'); |
|
| 32 | $treeBuilder->getRootNode() |
|
| 33 | ->children() |
|
| 34 | ->arrayNode('persistence') |
|
| 35 | ->addDefaultsIfNotSet() |
|
| 36 | ->children() |
|
| 37 | ->arrayNode('orm') |
|
| 38 | ->addDefaultsIfNotSet() |
|
| 39 | ->canBeEnabled() |
|
| 40 | ->children() |
|
| 41 | ->arrayNode('classes') |
|
| 42 | ->addDefaultsIfNotSet() |
|
| 43 | ->children() |
|
| 44 | ->arrayNode('rule') |
|
| 45 | ->addDefaultsIfNotSet() |
|
| 46 | ->children() |
|
| 47 | ->scalarNode('model')->cannotBeEmpty()->defaultValue(Rule::class)->end() |
|
| 48 | ->scalarNode('repository')->defaultValue(RuleRepository::class)->end() |
|
| 49 | ->scalarNode('interface')->defaultValue(RuleInterface::class)->end() |
|
| 50 | ->scalarNode('factory')->defaultValue(Factory::class)->end() |
|
| 51 | ->scalarNode('object_manager_name')->defaultValue(null)->end() |
|
| 52 | ->end() |
|
| 53 | ->end() |
|
| 54 | ->end() |
|
| 55 | ->end() |
|
| 56 | ->end() |
|
| 57 | ->end() |
|
| 58 | ->end() |
|
| 59 | ->end() |
|
| 60 | ->end(); |
|
| 61 | ||
| 62 | return $treeBuilder; |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||
| @@ 31-71 (lines=41) @@ | ||
| 28 | * |
|
| 29 | * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} |
|
| 30 | */ |
|
| 31 | class Configuration implements ConfigurationInterface |
|
| 32 | { |
|
| 33 | /** |
|
| 34 | * {@inheritdoc} |
|
| 35 | */ |
|
| 36 | public function getConfigTreeBuilder() |
|
| 37 | { |
|
| 38 | $treeBuilder = new TreeBuilder('swp_user'); |
|
| 39 | $treeBuilder->getRootNode() |
|
| 40 | ->children() |
|
| 41 | ->arrayNode('persistence') |
|
| 42 | ->addDefaultsIfNotSet() |
|
| 43 | ->children() |
|
| 44 | ->arrayNode('orm') |
|
| 45 | ->addDefaultsIfNotSet() |
|
| 46 | ->canBeEnabled() |
|
| 47 | ->children() |
|
| 48 | ->arrayNode('classes') |
|
| 49 | ->addDefaultsIfNotSet() |
|
| 50 | ->children() |
|
| 51 | ->arrayNode('user') |
|
| 52 | ->addDefaultsIfNotSet() |
|
| 53 | ->children() |
|
| 54 | ->scalarNode('model')->cannotBeEmpty()->defaultValue(User::class)->end() |
|
| 55 | ->scalarNode('repository')->defaultValue(EntityRepository::class)->end() |
|
| 56 | ->scalarNode('factory')->defaultValue(Factory::class)->end() |
|
| 57 | ->scalarNode('interface')->defaultValue(UserInterface::class)->end() |
|
| 58 | ->scalarNode('object_manager_name')->defaultValue(null)->end() |
|
| 59 | ->end() |
|
| 60 | ->end() |
|
| 61 | ->end() // classes |
|
| 62 | ->end() |
|
| 63 | ->end() |
|
| 64 | ->end() |
|
| 65 | ->end() |
|
| 66 | ->end() |
|
| 67 | ; |
|
| 68 | ||
| 69 | return $treeBuilder; |
|
| 70 | } |
|
| 71 | } |
|
| 72 | ||
| @@ 31-71 (lines=41) @@ | ||
| 28 | * |
|
| 29 | * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} |
|
| 30 | */ |
|
| 31 | class Configuration implements ConfigurationInterface |
|
| 32 | { |
|
| 33 | /** |
|
| 34 | * {@inheritdoc} |
|
| 35 | */ |
|
| 36 | public function getConfigTreeBuilder() |
|
| 37 | { |
|
| 38 | $treeBuilder = new TreeBuilder('swp_webhook'); |
|
| 39 | $treeBuilder->getRootNode() |
|
| 40 | ->children() |
|
| 41 | ->arrayNode('persistence') |
|
| 42 | ->addDefaultsIfNotSet() |
|
| 43 | ->children() |
|
| 44 | ->arrayNode('orm') |
|
| 45 | ->addDefaultsIfNotSet() |
|
| 46 | ->canBeEnabled() |
|
| 47 | ->children() |
|
| 48 | ->arrayNode('classes') |
|
| 49 | ->addDefaultsIfNotSet() |
|
| 50 | ->children() |
|
| 51 | ->arrayNode('webhook') |
|
| 52 | ->addDefaultsIfNotSet() |
|
| 53 | ->children() |
|
| 54 | ->scalarNode('model')->cannotBeEmpty()->defaultValue(Webhook::class)->end() |
|
| 55 | ->scalarNode('repository')->defaultValue(WebhookRepository::class)->end() |
|
| 56 | ->scalarNode('factory')->defaultValue(Factory::class)->end() |
|
| 57 | ->scalarNode('interface')->defaultValue(WebhookInterface::class)->end() |
|
| 58 | ->scalarNode('object_manager_name')->defaultValue(null)->end() |
|
| 59 | ->end() |
|
| 60 | ->end() |
|
| 61 | ->end() // classes |
|
| 62 | ->end() |
|
| 63 | ->end() |
|
| 64 | ->end() |
|
| 65 | ->end() |
|
| 66 | ->end() |
|
| 67 | ; |
|
| 68 | ||
| 69 | return $treeBuilder; |
|
| 70 | } |
|
| 71 | } |
|
| 72 | ||