Commit 40dc2812 authored by Guillaume Perréal's avatar Guillaume Perréal

Ajout d'informations dans la configuration.

A afficher avec app/console config:dump-reference irstea_plant_uml.
parent 6f6e96f2
......@@ -25,15 +25,19 @@ class Configuration implements ConfigurationInterface
$treeBuilder->root('irstea_plant_uml')
->children()
->arrayNode('binaries')
->info("Chemins vers les fichiers binaires (INUTILISE POUR L'INSTANT).")
->addDefaultsIfNotSet()
->children()
->scalarNode('java')
->info("Commande 'java'")
->defaultValue("java")
->end()
->scalarNode('plamtuml_jar')
->info("Archive du logiciel PlantUML")
->defaultValue("plantuml.jar")
->end()
->scalarNode('dot')
->info("Commande 'dot' du package 'graphviz'")
->defaultValue("dot")
->end()
->end()
......@@ -48,52 +52,62 @@ class Configuration implements ConfigurationInterface
{
$node = (new TreeBuilder())->root('graphs');
$decorators = ['inheritance', 'traits', 'interfaces', 'entity', 'associations', 'properties', 'methods', 'fields', 'attributes'];
$decorators = ['inheritance', 'traits', 'interfaces', 'entity', 'associations', 'methods', 'fields', 'attributes'];
$node
->info("Graphes.")
->useAttributeAsKey('name')
->prototype('array')
->info("description d'un graphe à générer.")
->children()
->arrayNode('sources')
->info("Sélection des classes à examiner.")
->addDefaultsIfNotSet()
->children()
->enumNode('type')
->info("Source de la liste de classes.")
->defaultValue('classes')
->values(['classes', 'entities'])
->end()
->scalarNode('entity_manager')
->info("Entity Manager à utiliser pour les entités.")
->defaultValue('default')
->end()
->arrayNode('directories')
->info("Répertoires contenant les sources.")
->defaultValue(['%kernel.root_dir%/../src'])
->prototype('scalar')->end()
->end()
->append($this->buildFilterNode('include'))
->append($this->buildFilterNode('exclude'))
->append($this->buildFilterNode('include', 'à inclure'))
->append($this->buildFilterNode('exclude', 'à ignorer'))
->end()
->end()
->arrayNode('layout')
->info("Configuration de la disposition et du parcours.")
->addDefaultsIfNotSet()
->children()
->enumNode('namespaces')
->info("Types .")
->defaultValue('php')
->values(['bundles', 'php', 'flat', 'entities'])
->end()
->append($this->buildFilterNode('include'))
->append($this->buildFilterNode('exclude'))
->append($this->buildFilterNode('include', 'à tracer'))
->append($this->buildFilterNode('exclude', 'à ne pas tracer'))
->end()
->end()
->arrayNode('decoration')
->info("Informations à afficher sur les classes.")
->addDefaultsIfNotSet()
->children()
->arrayNode('decorators')
->info("Liste des décorateurs à utiliser.")
->defaultValue($decorators)
->prototype('enum')
->values($decorators)
->end()
->end()
->append($this->buildFilterNode('include'))
->append($this->buildFilterNode('exclude'))
->append($this->buildFilterNode('include', 'à décorer'))
->append($this->buildFilterNode('exclude', 'à ne pas décorer'))
->end()
->end()
->end()
......@@ -102,16 +116,18 @@ class Configuration implements ConfigurationInterface
return $node;
}
protected function buildFilterNode($nodeName)
protected function buildFilterNode($nodeName, $description)
{
$node = (new TreeBuilder())->root($nodeName);
$node
->children()
->arrayNode('directories')
->info("Répertoires $description")
->prototype('scalar')->end()
->end()
->arrayNode('namespaces')
->info("Namespaces $description")
->prototype('scalar')->end()
->end()
->end();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment