feat: Added config html page for storages on baikal browser
feat(tw): Used RELATED-TO iCal prop as depends prop feat(tw): Used DESCRIPTION iCal prop as annotations refactor(tw): Changed project_tag_prefix to project_category_prefix chore(tw): Added documentation on configs
This commit is contained in:
@@ -6,7 +6,6 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
use Symfony\Component\Config\Definition\Processor;
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
use Carbon\CarbonTimeZone;
|
||||
|
||||
class ConfigBuilder implements ConfigurationInterface {
|
||||
private $configs = [];
|
||||
@@ -40,14 +39,7 @@ class ConfigBuilder implements ConfigurationInterface {
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->scalarNode('timezone')
|
||||
->defaultValue('UTC')
|
||||
->validate()
|
||||
->IfNotInArray(CarbonTimeZone::listIdentifiers())
|
||||
->thenInvalid('Invalid timezone identifier %s')
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->arrayNode('storages')
|
||||
->children();
|
||||
@@ -67,4 +59,9 @@ class ConfigBuilder implements ConfigurationInterface {
|
||||
$parseContents = Yaml::parse($contents);
|
||||
return $this->processor->processConfiguration($this, [$parseContents]);
|
||||
}
|
||||
|
||||
public function saveConfigs($configs) {
|
||||
$yaml = Yaml::dump($configs, 3, 2);
|
||||
file_put_contents($this->configFile, $yaml);
|
||||
}
|
||||
}
|
||||
|
@@ -11,12 +11,15 @@ class TaskwarriorConfig {
|
||||
->children()
|
||||
->scalarNode('taskdata')
|
||||
->defaultValue('~/.task')
|
||||
->info('The environment variable overrides the default and the command line, and the "data.location" configuration setting of the task data directory')
|
||||
->end()
|
||||
->scalarNode('taskrc')
|
||||
->defaultValue('~/.taskrc')
|
||||
->info('The enivronment variable overrides the default and the command line specification of the .taskrc file')
|
||||
->end()
|
||||
->scalarNode('project_tag_suffix')
|
||||
->scalarNode('project_category_prefix')
|
||||
->defaultValue('project_')
|
||||
->info('The word after the given prefix for a iCal category will be used to identify a task\'s project')
|
||||
->end()
|
||||
->end();
|
||||
|
||||
|
Reference in New Issue
Block a user