From 9da1382628311f67031a1e2fc3da205fc7119fe2 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Mon, 14 Oct 2024 10:34:39 +0200 Subject: [PATCH] [TASK] CGL --- .../ExtensionArchitecture/BestPractises/_dto.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Documentation/ExtensionArchitecture/BestPractises/_dto.php b/Documentation/ExtensionArchitecture/BestPractises/_dto.php index 6d29afcff..9b484c4cc 100644 --- a/Documentation/ExtensionArchitecture/BestPractises/_dto.php +++ b/Documentation/ExtensionArchitecture/BestPractises/_dto.php @@ -61,18 +61,16 @@ public function setLastName(string $last_name): void // An Extbase controller utilizing DTO-to-entity transfer class DtoController extends TYPO3\CMS\Extbase\Mvc\Controller\ActionController { - public function __construct(protected MyVendor\MyExtension\Domain\Repository\PersonRepository $personRepository) - { - } + public function __construct(protected MyVendor\MyExtension\Domain\Repository\PersonRepository $personRepository) {} - function createAction(): Psr\Http\Message\ResponseInterface + public function createAction(): Psr\Http\Message\ResponseInterface { // Set up a DTO to be filled with input data. // The Fluid template would use and its helpers. $this->view->assign('personDTO', new PersonDTO()); } - function saveAction(PersonDTO $personDTO): Psr\Http\Message\ResponseInterface + public function saveAction(PersonDTO $personDTO): Psr\Http\Message\ResponseInterface { // Transfer all data to a proper Extbase entity. // Create an empty entity first: