customize html and pdf exports with twig templates (#1582)
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user