Forked from Fize Jacques / biotex_python
Source project has a limited visibility.
Configuration.php 7.21 KiB
<?php declare(strict_types=1);
/*
 * This file is part of "irstea/plantuml-bundle".
 * Copyright (C) 2016-2020 IRSTEA
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or (at your option) any
 * later version.
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License and the GNU
 * Lesser General Public License along with this program. If not, see
 * <https://www.gnu.org/licenses/>.
namespace Irstea\PlantUmlBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
 * Description of Configuration.
class Configuration implements ConfigurationInterface
    public function getConfigTreeBuilder()
        $treeBuilder = new TreeBuilder();
        $treeBuilder->root('irstea_plant_uml')
            ->children()
                ->arrayNode('output')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('directory')
                            ->info('Répertoire dans lequel écrire les fichiers.')
                            ->defaultValue('%kernel.root_dir%/Resources/doc')
                        ->end()
                        ->enumNode('format')
                            ->info('Format de sortie (cf. PlantUML).')
                            ->defaultValue('svg')
                            ->values(['png', 'svg', 'eps', 'pdf', 'vdx', 'html', 'xmi', 'txt', 'utxt'])
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('binaries')
                    ->info("Chemins vers les fichiers binaires, s'ils en sont pas dans PATH.")
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('java')
                            ->info("Commande 'java'")
                            ->defaultValue('java')
                        ->end()
                        ->scalarNode('plamtuml_jar')
                            ->info('Archive du logiciel PlantUML')
                            ->defaultValue(dirname(__DIR__, 2) . '/bin/plantuml.jar')
                        ->end()
                        ->scalarNode('dot')
                            ->info("Commande 'dot' du package 'graphviz'")
                            ->defaultValue('dot')
                        ->end()
                    ->end()
                ->end()
                ->append($this->buildGraphNode())
            ->end();