Skip to content

Commit

Permalink
improve export template docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpapst committed Dec 16, 2024
1 parent ab1800d commit 3114311
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions collections/_documentation/developer/extending-kimai.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ If you create customer templates, beware of these rules:
- You should store your templates in `var/export/`, as this directory is not shipped with Kimai and not touched during updates (instead of `templates/export/renderer/`)
- You can configure different search directories through the config key `kimai.export.documents` if you want to add additional template source directories
- You can hide the default templates by setting the key `kimai.export.defaults` to an empty array / null
- You can translate the button for your template, by adding its name to the export translation file, eg. `translations/export.en.xlf`

## Adding export renderer

Expand Down Expand Up @@ -221,6 +222,8 @@ final class TimesheetIdRenderer implements RendererInterface

All you need to do is to register it as a service in the Symfony DI container.

Internally for each template a new ExportRenderer service is registered, called `exporter_renderer.filename_EXT_twig` (see `ExportServiceCompilerPass`).

### Adding timesheet export renderer

Timesheet exporter (implementing the interface `App\Export\TimesheetExportInterface`) are almost the same as export renderer,
Expand Down

0 comments on commit 3114311

Please sign in to comment.