2

Symfony2 の構成を考えると:

$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('acme');        

$rootNode
    ->children()
        ->booleanNode('enableErrorReport')
            ->defaultFalse()
        ->end()
        ->arrayNode('errorReportAdresses')
            ->info('a list of commaseparated email addresses')
            ->prototype('scalar')->end()
        ->end()
    ->end()
;

errorReportAdressestrue の場合にのみ必須にするにはどうすればよいenableErrorReportですか?

4

1 に答える 1