You've already forked redmine-bundle
Initial commit
This commit is contained in:
42
src/DependencyInjection/Configuration.php
Normal file
42
src/DependencyInjection/Configuration.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Magdev\RedmineBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
|
||||
/**
|
||||
* @author Marco Grätsch <magdev3.0@gmail.com>
|
||||
*/
|
||||
final class Configuration implements ConfigurationInterface
|
||||
{
|
||||
public function getConfigTreeBuilder(): TreeBuilder
|
||||
{
|
||||
$treeBuilder = new TreeBuilder('magdev_gitea');
|
||||
$rootNode = $treeBuilder->getRootNode();
|
||||
$rootNode->fixXmlConfig('connection')
|
||||
->children()
|
||||
->arrayNode('connections')
|
||||
->useAttributeAsKey('name')
|
||||
->normalizeKeys(false)
|
||||
->arrayPrototype()
|
||||
->children()
|
||||
->scalarNode('baseurl')
|
||||
->isRequired()
|
||||
->info('The base URL of the gitea instance')
|
||||
->end()
|
||||
->scalarNode('token')
|
||||
->isRequired()
|
||||
->info('The Gitea access token')
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->scalarNode('default_connection')->end()
|
||||
;
|
||||
|
||||
return $treeBuilder;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user