From afa783608bf68b92191cf173f3d5aeed77423935 Mon Sep 17 00:00:00 2001
From: Torsten Oppermann <torsten@sgalinski.de>
Date: Mon, 17 Sep 2018 10:12:44 +0200
Subject: [PATCH] [TASK] FormEditorController uses new registration now

---
 Classes/Service/RegisterService.php          | 2 --
 Classes/XClass/Form/FormEditorController.php | 6 ++++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Classes/Service/RegisterService.php b/Classes/Service/RegisterService.php
index ba8dda3c..876f8b49 100644
--- a/Classes/Service/RegisterService.php
+++ b/Classes/Service/RegisterService.php
@@ -99,8 +99,6 @@ class RegisterService implements \TYPO3\CMS\Core\SingletonInterface {
 
 	/**
 	 * Read every registered file and create a registration entry in the registerArray if possible
-	 *
-	 * @internal
 	 */
 	public function registerExtensions() {
 		// clear registerArray
diff --git a/Classes/XClass/Form/FormEditorController.php b/Classes/XClass/Form/FormEditorController.php
index 2a788235..ed53ac87 100644
--- a/Classes/XClass/Form/FormEditorController.php
+++ b/Classes/XClass/Form/FormEditorController.php
@@ -26,6 +26,7 @@ namespace SGalinski\SgMail\XClass\Form;
  ***************************************************************/
 
 use SGalinski\SgMail\Service\MailTemplateService;
+use SGalinski\SgMail\Service\RegisterService;
 use SGalinski\SgMail\Service\TypoScriptSettingsService;
 use Symfony\Component\Yaml\Yaml;
 use TYPO3\CMS\Core\Cache\CacheManager;
@@ -137,8 +138,9 @@ class FormEditorController extends \TYPO3\CMS\Form\Controller\FormEditorControll
 		// write the new Register.php file
 		$this->writeRegisterFile($renderables, $extensionKey, $templateKey);
 
-		// call register function in mail template service class
-		MailTemplateService::registerExtensions();
+		// call register function in register service class
+		$registrationService = GeneralUtility::makeInstance(RegisterService::class);
+		$registrationService->registerExtensions();
 
 		// clear caches
 		$this->clearCaches();
-- 
GitLab