customize html and pdf exports with twig templates (#1582)

This commit is contained in:
Kevin Papst
2020-03-23 01:51:02 +01:00
committed by GitHub
parent 1ca1b00d11
commit 33f76f426c
32 changed files with 895 additions and 307 deletions

View File

@@ -57,6 +57,7 @@ class Configuration implements ConfigurationInterface
->append($this->getUserNode())
->append($this->getTimesheetNode())
->append($this->getInvoiceNode())
->append($this->getExportNode())
->append($this->getLanguagesNode())
->append($this->getCalendarNode())
->append($this->getThemeNode())
@@ -236,6 +237,33 @@ class Configuration implements ConfigurationInterface
return $node;
}
protected function getExportNode()
{
$builder = new TreeBuilder('export');
/** @var ArrayNodeDefinition $node */
$node = $builder->getRootNode();
$node
->addDefaultsIfNotSet()
->children()
->arrayNode('defaults')
->scalarPrototype()->end()
->defaultValue([
'var/export/',
'templates/export/renderer/'
])
->end()
->arrayNode('documents')
->requiresAtLeastOneElement()
->scalarPrototype()->end()
->defaultValue([])
->end()
->end()
;
return $node;
}
protected function getLanguagesNode()
{
$builder = new TreeBuilder('languages');