[TASK] Adjust example from mediumDoc to DocumentTemplate

Since 6.1 mediumDoc etc. are deprecated and DocumentTemplate
should be used. Adjust example-code to this change.

Resolves: #47204
Releases: 6.1
Change-Id: I20d7d1c18da738717db7e2dfb1844e80d99343da
Reviewed-on: https://review.typo3.org/19953
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn