Resolves #64525: Extbase does not find the templates of backend Font Maker in TYPO3 7.0
authorstan <stan@735d13b6-9817-0410-8766-e36946ffe9aa>
Tue, 27 Jan 2015 03:42:58 +0000 (03:42 +0000)
committerstan <stan@735d13b6-9817-0410-8766-e36946ffe9aa>
Tue, 27 Jan 2015 03:42:58 +0000 (03:42 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/sr_freecap/trunk@88281 735d13b6-9817-0410-8766-e36946ffe9aa

ChangeLog
Classes/Controller/FontMakerController.php
Configuration/FontMaker/setup.txt [deleted file]
ext_tables.php

index dc4e807..c581acf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
        * Resolves #64519: Validate annotation: class name TtfFileValidator should not start with backslash
        * Resolves #64520: Extract module configuration from static template
        * Resolves #64524: SJBR\SrFreecap\Domain\Model\Font raises warning on PHP 5.4+
+       * Resolves #64525: Extbase does not find the templates of backend Font Maker in TYPO3 7.0
 
 2014-09-22  Stanislas Rolland  <typo3@sjbr.ca>
 
index bf0127b..2a69ea1 100644 (file)
@@ -38,6 +38,30 @@ class FontMakerController  extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionContr
        protected $extensionName = 'SrFreecap';
 
        /**
+        * Initializes the controller before invoking an action method.
+        * @return void
+        */
+       protected function initializeAction() {
+               $this->setBackendModuleTemplates();
+       }
+       
+       /**
+        * Set Backend Module Templates
+        * @return void
+        */
+       private function setBackendModuleTemplates(){
+               $frameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
+               $viewConfiguration = array(
+                       'view' => array(
+                               'templateRootPath' => 'EXT:sr_freecap/Resources/Private/Backend/Templates/',
+                               'partialRootPath' => 'EXT:sr_freecap/Resources/Private/Partials/',
+                               'layoutRootPath' => 'EXT:sr_freecap/Resources/Private/Backend/Layouts/'
+                       )
+               );
+               $this->configurationManager->setConfiguration(array_merge($frameworkConfiguration, $viewConfiguration));        
+       }
+
+       /**
         * Display the font maker form
         *
         * @param \SJBR\SrFreecap\Domain\Model\Font $font
diff --git a/Configuration/FontMaker/setup.txt b/Configuration/FontMaker/setup.txt
deleted file mode 100644 (file)
index c3e22a2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-## Configuring the Font Maker backend module
-module.tx_srfreecap {
-       features.rewrittenPropertyMapper = 1
-       ## Paths for backend templates
-       view {
-               templateRootPath = EXT:sr_freecap/Resources/Private/Backend/Templates/
-               partialRootPath = EXT:sr_freecap/Resources/Private/Partials/
-               layoutRootPath = EXT:sr_freecap/Resources/Private/Backend/Layouts/
-       }
-}
index a8d72f4..6da1bfb 100644 (file)
@@ -1,7 +1,6 @@
 <?php
-if (!defined ('TYPO3_MODE')) {
-       die ('Access denied.');
-}
+defined('TYPO3_MODE') or die();
+
 $extensionName = \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($_EXTKEY);
 
 // Add TypoScript settings
@@ -33,8 +32,5 @@ if (TYPO3_MODE == 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
                                'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xlf'
                        )
                );
-               // Add configuration setup
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'setup', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Configuration/FontMaker/setup.txt">');
        }
 }
-?>