SHOW:
|
|
- or go back to the newest paste.
| 1 | <? | |
| 2 | ||
| 3 | namespace Bundle\PaymentGatewayBundle\DependencyInjection; | |
| 4 | ||
| 5 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; | |
| 6 | use Symfony\Component\Config\Definition\ConfigurationInterface; | |
| 7 | ||
| 8 | class Configuration implements ConfigurationInterface | |
| 9 | {
| |
| 10 | ||
| 11 | public function getConfigTreeBuilder() | |
| 12 | {
| |
| 13 | $treeBuilder = new TreeBuilder(); | |
| 14 | $rootNode = $treeBuilder->root('payment_gateway');
| |
| 15 | ||
| 16 | $rootNode | |
| 17 | ->children() | |
| 18 | ->arrayNode('config')
| |
| 19 | ->children() | |
| 20 | ->arrayNode('default')
| |
| 21 | ->children() | |
| 22 | ->scalarNode('apiLoginId')->isRequired()->cannotBeEmpty()->end()
| |
| 23 | ->scalarNode('transactionKey')->isRequired()->cannotBeEmpty()->end()
| |
| 24 | ->scalarNode('postUrl')->isRequired()->cannotBeEmpty()->end()
| |
| 25 | ->end() | |
| 26 | ->end() | |
| 27 | ->end() | |
| 28 | ->end() | |
| 29 | ->end(); | |
| 30 | ||
| 31 | ||
| 32 | return $treeBuilder; | |
| 33 | } | |
| 34 | ||
| 35 | } |