From 117dee5afc3b86e09e86e22ba6c9bd526e4b2e35 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 22 Aug 2024 14:29:03 +1200 Subject: [PATCH] DOC Update typehints in docs --- en/02_Developer_Guides/01_Templates/01_Syntax.md | 2 +- .../15_Customising_the_Admin_Interface/04_Preview.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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".