baikal-storage-plugin/lib/Configs/Todotxt.php

22 lines
515 B
PHP
Raw Normal View History

2020-05-03 16:41:59 -05:00
<?php
namespace Aerex\BaikalStorage\Configs;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
class Config extends AbstractConfig {
protected function getConfigTree() {
$treeBuilder = new TreeBuilder('config');
$rootNode = $treeBuilder->getRootNode();
$rootNode->children
->scalarNode('storage')
->isRequired()
->ifNotInArray(['todotxt'])
->thenInvalid('Invalid storage %s')
->end();
return $treeBuilder;
}
}