You've already forked dolibarr-api-bundle
initial version
This commit is contained in:
37
src/DependencyInjection/Configuration.php
Normal file
37
src/DependencyInjection/Configuration.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Magdev\DolibarrApiBundle\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(name: 'magdev_dolibarr_api');
|
||||
$rootNode = $treeBuilder->getRootNode();
|
||||
$rootNode->children()
|
||||
->scalarNode(name: 'baseUri')
|
||||
->isRequired()
|
||||
->cannotBeEmpty()
|
||||
->example(example: 'http://localhost')
|
||||
->end()
|
||||
->scalarNode(name: 'token')
|
||||
->isRequired()
|
||||
->cannotBeEmpty()
|
||||
->example(example: 'your-secret-api-token')
|
||||
->end()
|
||||
->booleanNode(name: 'verifyHttps')
|
||||
->defaultTrue()
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
|
||||
return $treeBuilder;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user