diff --git a/en/02_Developer_Guides/01_Templates/01_Syntax.md b/en/02_Developer_Guides/01_Templates/01_Syntax.md index 16b318a2..82c79121 100644 --- a/en/02_Developer_Guides/01_Templates/01_Syntax.md +++ b/en/02_Developer_Guides/01_Templates/01_Syntax.md @@ -575,7 +575,7 @@ use Page; class HomePage extends Page { - public function forTemplate() + public function forTemplate(): string { // We can also render a template here using $this->renderWith() return 'Page: ' . $this->Title; diff --git a/en/02_Developer_Guides/15_Customising_the_Admin_Interface/04_Preview.md b/en/02_Developer_Guides/15_Customising_the_Admin_Interface/04_Preview.md index 0ef01c72..ad892e8d 100644 --- a/en/02_Developer_Guides/15_Customising_the_Admin_Interface/04_Preview.md +++ b/en/02_Developer_Guides/15_Customising_the_Admin_Interface/04_Preview.md @@ -292,7 +292,7 @@ class Product extends DataObject implements CMSPreviewable { // ... - public function forTemplate() + public function forTemplate(): string { // If the template for this DataObject is not an "Include" template, use the appropriate type here // e.g. "Layout".