[BUGFIX] Adapt font maker backend module to TYPO3 CMS 7 & 8 11/56511/2
authorStanislas Rolland <typo3@sjbr.ca>
Mon, 2 Apr 2018 16:56:44 +0000 (12:56 -0400)
committerStanislas Rolland <typo3@sjbr.ca>
Mon, 2 Apr 2018 16:58:06 +0000 (18:58 +0200)
Resolves: #84576
Change-Id: Ie4f6980231847292650a83ca6c3e395a6669e1b3
Reviewed-on: https://review.typo3.org/56511
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
13 files changed:
ChangeLog
Classes/Controller/FontMakerController.php
Classes/Domain/Model/Font.php
Classes/Utility/FontMakingUtility.php
Classes/Utility/GifBuilderUtility.php
Configuration/TypoScript/FontMaker/setup.txt [deleted file]
Configuration/TypoScript/FontMaker/setup.typoscript [new file with mode: 0644]
Resources/Private/Backend/Layouts/Default.html
Resources/Private/Language/fr.locallang.xlf
Resources/Private/Language/locallang.xlf
Resources/Public/Icons/Extension.svg [new file with mode: 0644]
ext_icon.gif [deleted file]
ext_tables.php

index b8f4e35..158a82b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2018-04-02  Stanislas Rolland  <typo(arobas)sjbr.ca>
+       * Resolves #84576: Adapt font maker backend module to TYPO3 CMS 7 & 8
+
 2018-04-01  Stanislas Rolland  <typo(arobas)sjbr.ca>
        * Resolves #83808: Allow translation of invalid input error (Thanks to Christian Toffolo)
 
index 8a27844..6c1fb03 100644 (file)
@@ -4,7 +4,7 @@ namespace SJBR\SrFreecap\Controller;
 /***************************************************************
  *  Copyright notice
  *
- *  (c) 2012-2015 Stanislas Rolland <typo3@sjbr.ca>
+ *  (c) 2012-2018 Stanislas Rolland <typo3@sjbr.ca>
  *  All rights reserved
  *
  *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -26,13 +26,16 @@ namespace SJBR\SrFreecap\Controller;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use SJBR\SrFreecap\Domain\Model\Font;
+use SJBR\SrFreecap\Domain\Repository\FontRepository;
+use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
+
 /**
  * Font Maker controller
- *
- * @author Stanislas Rolland <typo3@sjbr.ca>
  */
-class FontMakerController  extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
-
+class FontMakerController  extends ActionController
+{
        /**
         * @var string Name of the extension this controller belongs to
         */
@@ -41,12 +44,13 @@ class FontMakerController  extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionContr
        /**
         * Display the font maker form
         *
-        * @param \SJBR\SrFreecap\Domain\Model\Font $font
+        * @param Font $font
         * @return string An HTML form for creating a new font
         */
-       public function newAction(\SJBR\SrFreecap\Domain\Model\Font $font = NULL) {
+       public function newAction(Font $font = null)
+       {
                if (!is_object($font)) {
-                       $font = $this->objectManager->get('SJBR\\SrFreecap\\Domain\\Model\\Font');
+                       $font = $this->objectManager->get(Font::class);
                }
                $this->view->assign('font', $font);
        }       
@@ -54,14 +58,15 @@ class FontMakerController  extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionContr
        /**
         * Create the font file and display the result
         *
-        * @param \SJBR\SrFreecap\Domain\Model\Font $font
+        * @param Font $font
         * @return string HTML presenting the new font that was created
         */
-       public function createAction(\SJBR\SrFreecap\Domain\Model\Font $font) {
+       public function createAction(Font $font)
+       {
                // Create the font data
                $font->createGdFontFile();
                // Store the GD font file
-               $fontRepository = $this->objectManager->get('SJBR\\SrFreecap\\Domain\\Repository\\FontRepository');
+               $fontRepository = $this->objectManager->get(FontRepository::class);
                $fontRepository->writeFontFile($font);
                $this->view->assign('font', $font);
        }
index 1f9afe3..08cd691 100644 (file)
@@ -1,10 +1,11 @@
 <?php
 declare(encoding='ISO-8859-2');
 namespace SJBR\SrFreecap\Domain\Model;
+
 /***************************************************************
  *  Copyright notice
  *
- *  (c) 2012-2015 Stanislas Rolland <typo3@sjbr.ca>
+ *  (c) 2012-2018 Stanislas Rolland <typo3@sjbr.ca>
  *  All rights reserved
  *
  *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -27,16 +28,18 @@ namespace SJBR\SrFreecap\Domain\Model;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-use \SJBR\SrFreecap\Utility\FontMakingUtility;
+use SJBR\SrFreecap\Utility\FontMakingUtility;
+use SJBR\SrFreecap\Validation\Validator\TtfFileValidator;
+use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
 
 /**
  * Font object
  *
  * This file must be iso-8859-2-encoded!
  *
- * @author Stanislas Rolland <typo3@sjbr.ca>
  */
-class Font extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
+class Font extends AbstractEntity
+{
        /**
         * @var int
         */
@@ -44,13 +47,13 @@ class Font extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
 
        /**
         * @var int
-        * *@validate NumberRange(minimum=5, maximum=255)*
+        * @validate NumberRange(minimum=5, maximum=255)
         */
        protected $characterWidth;
 
        /**
         * @var int
-        * *@validate NumberRange(minimum=5, maximum=255)*
+        * @validate NumberRange(minimum=5, maximum=255)
         */
        protected $characterHeight;
 
@@ -61,8 +64,9 @@ class Font extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
 
        /**
         * @var string
-        * *@validate StringLength(minimum=1, maximum=255)*
-        * *@validate SJBR\SrFreecap\Validation\Validator\TtfFileValidator*
+        * @validate NotEmpty
+        * @validate StringLength(minimum=1, maximum=255)
+        * @validate \SJBR\SrFreecap\Validation\Validator\TtfFileValidator
         **/
        protected $ttfFontFileName = '';
 
@@ -184,7 +188,8 @@ class Font extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
        /**
         * Creates teh GD font file
         */
-       public function createGdFontFile() {
+       public function createGdFontFile()
+       {
                switch ($this->charactersIncludedInFont) {
                        case 1:
                                $characters = 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z';
@@ -217,10 +222,9 @@ class Font extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
                } else {
                        $image = @ImageCreateFromGIF(PATH_site . $this->pngImageFileName);
                }
-               if ($image !== FALSE) {
+               if ($image !== false) {
                        $this->setGdFontdata(FontMakingUtility::makeFont($image, $numberOfCharacters, $startCharacter, $this->characterWidth, $this->characterHeight, $this->endianness));
                        ImageDestroy($image);
                }
        }
-}
-?>
\ No newline at end of file
+}
\ No newline at end of file
index 6154afa..4c27029 100644 (file)
@@ -4,7 +4,7 @@ namespace SJBR\SrFreecap\Utility;
 /*
  *  Copyright notice
  *
- *  (c) 2012-2015 Stanislas Rolland <typo3(arobas)sjbr.ca>
+ *  (c) 2012-2018 Stanislas Rolland <typo3(arobas)sjbr.ca>
  *  All rights reserved
  *
  *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -27,15 +27,15 @@ namespace SJBR\SrFreecap\Utility;
  *  This copyright notice MUST APPEAR in all copies of the script!
  */
 
-use \TYPO3\CMS\Core\Utility\GeneralUtility;
-use \TYPO3\CMS\Core\Utility\VersionNumberUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\VersionNumberUtility;
+use TYPO3\CMS\Extbase\Object\ObjectManager;
 
 /**
  * Utility for making GD fonts
  */
 class FontMakingUtility
 {
-
        /**
         * Returns an image displaying a list of characters with specified font file and character size
         *
@@ -47,7 +47,6 @@ class FontMakingUtility
         */
        public static function makeFontImage($characters, $font, $width = 34, $height = 50)
        {
-               
                $size = intval($height * .8);
                $vertOffset = intval($height * .7);
                $color = '#000000';
@@ -80,14 +79,14 @@ class FontMakingUtility
                        $gifObjArray[$ic . '0.']['maxWidth'] = $width;
                        $gifObjArray[$ic . '0.']['offset'] = (($ic-1) * $width + $hOffset) . ',' . $vertOffset;
                }
-               $objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
-               $gifCreator = $objectManager->get('SJBR\\SrFreecap\\Utility\\GifBuilderUtility');
+               $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
+               $gifCreator = $objectManager->get(GifBuilderUtility::class);
                $gifCreator->init();
                if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib']) {
                        $gifCreator->start($gifObjArray, array());
                        return $gifCreator->gifBuild();
                } else {
-                       return FALSE;
+                       return false;
                }
        }
 
index 25f1fd8..ba528ed 100644 (file)
@@ -1,57 +1,65 @@
 <?php
 namespace SJBR\SrFreecap\Utility;
+
 /***************************************************************
-*  Copyright notice
-*
-*  (c) 2012 Stanislas Rolland <typo3(arobas)sjbr.ca>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
+ *  Copyright notice
+ *
+ *  (c) 2012-2018 Stanislas Rolland <typo3(arobas)sjbr.ca>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\PathUtility;
+use TYPO3\CMS\Frontend\Imaging\GifBuilder;
+
 /**
  * Utility extending Gif builder
- * @author Stanislas Rolland <typo3(arobas)sjbr.ca>
  */
-class GifBuilderUtility extends \TYPO3\CMS\Frontend\Imaging\GifBuilder {
+class GifBuilderUtility extends GifBuilder
+{
        /**
         * Returns the reference to a "resource" in TypoScript.
         *
-        * @param       string          The resource value.
-        * @return      string          Returns the relative filepath
-        * @access private
-        * @see t3lib_TStemplate::getFileName()
+        * @param string The resource value.
+        * @return string Returns the relative filepath
         */
-       public function checkFile ($file) {
+       public function checkFile($file)
+       {
+               $file = GeneralUtility::getFileAbsFileName(PATH_site . $file);
+        $file = PathUtility::stripPathSitePrefix($file);
                return $file;
        }
 
        /**
         * Writes the input GDlib image pointer to file
         *
-        * @param       resource        The GDlib image resource pointer
-        * @param       string          The filename to write to
-        * @return      mixed           The output of either imageGif, imagePng or imageJpeg based on the filename to write
+        * @param resource The GDlib image resource pointer
+        * @param string The filename to write to
+        * @param int $quality The image quality (for JPEGs)
+        * @return mixed The output of either imageGif, imagePng or imageJpeg based on the filename to write
         * @see maskImageOntoImage(), scale(), output()
         */
-       public function ImageWrite ($destImg, $theImage) {
-               return parent::ImageWrite($destImg, PATH_site.$theImage);
+       public function ImageWrite($destImg, $theImage, $quality = 0)
+       {
+               return parent::ImageWrite($destImg, PATH_site.$theImage, $quality);
        }
-}
-?>
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/Configuration/TypoScript/FontMaker/setup.txt b/Configuration/TypoScript/FontMaker/setup.txt
deleted file mode 100644 (file)
index d3b6c7c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-## Configuring the Font Maker backend module
-module.tx_srfreecap {
-       ## Paths for backend templates
-       view {
-               templateRootPaths.0 = EXT:sr_freecap/Resources/Private/Backend/Templates/
-               partialRootPaths.0 = EXT:sr_freecap/Resources/Private/Partials/
-               layoutRootPaths.0 = EXT:sr_freecap/Resources/Private/Backend/Layouts/
-       }
-}
\ No newline at end of file
diff --git a/Configuration/TypoScript/FontMaker/setup.typoscript b/Configuration/TypoScript/FontMaker/setup.typoscript
new file mode 100644 (file)
index 0000000..d3b6c7c
--- /dev/null
@@ -0,0 +1,9 @@
+## Configuring the Font Maker backend module
+module.tx_srfreecap {
+       ## Paths for backend templates
+       view {
+               templateRootPaths.0 = EXT:sr_freecap/Resources/Private/Backend/Templates/
+               partialRootPaths.0 = EXT:sr_freecap/Resources/Private/Partials/
+               layoutRootPaths.0 = EXT:sr_freecap/Resources/Private/Backend/Layouts/
+       }
+}
\ No newline at end of file
index 1e93c16..420f124 100644 (file)
@@ -1,4 +1,4 @@
-<f:be.container addCssFile="{f:uri.resource(path:'StyleSheets/FontMaker.css')}">
+<f:be.container includeCssFiles="{0: '{f:uri.resource(path:\'StyleSheets/FontMaker.css\')}'}">
        <div id="typo3-docheader">
                <div class="typo3-docheader-functions">&nbsp;</div>
                <div class="typo3-docheader-buttons">&nbsp;</div>
index b6c4653..771cd07 100644 (file)
                                <source>Please enter the word or number as it appears in the image. The entered value was incorrect.</source>
                                <target>Entre le mot ou le nombre tel qu'il apparaît dans l'image. La valeur entrée était incorrecte.</target>
                        </trans-unit>
+                       <trans-unit id="1221560718" xml:space="preserve">
+                               <source>Please enter the path to the source TTF font file relative to TYPO3 site.</source>
+                               <target>Veuillez entrer le chemin jusqu'au fichier de police TTF relativement au site TYPO3.</target>
+                       </trans-unit>
+                       <trans-unit id="1221560718_informal" xml:space="preserve">
+                               <source>Please enter the path to the source TTF font file relative to TYPO3 site.</source>
+                               <target>Entre le chemin jusqu'au fichier de police TTF relativement au site TYPO3.</target>
+                       </trans-unit>
                </body>
        </file>
 </xliff>
\ No newline at end of file
index 446c287..8c425b5 100644 (file)
                        <trans-unit id="9221561048_informal" xml:space="preserve">
                                <source>Please enter the word or number as it appears in the image. The entered value was incorrect.</source>
                        </trans-unit>
+                       <trans-unit id="1221560718" xml:space="preserve">
+                               <source>Please enter the path to the source TTF font file relative to TYPO3 site.</source>
+                       </trans-unit>
+                       <trans-unit id="1221560718_informal" xml:space="preserve">
+                               <source>Please enter the path to the source TTF font file relative to TYPO3 site.</source>
+                       </trans-unit>
                </body>
        </file>
 </xliff>
\ No newline at end of file
diff --git a/Resources/Public/Icons/Extension.svg b/Resources/Public/Icons/Extension.svg
new file mode 100644 (file)
index 0000000..9afcb95
--- /dev/null
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="210mm"
+   height="297mm"
+   viewBox="0 0 210 297"
+   version="1.1"
+   id="svg16"
+   inkscape:version="0.92.1 r15371"
+   sodipodi:docname="Extension.svg">
+  <defs
+     id="defs10" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.35"
+     inkscape:cx="-452.59843"
+     inkscape:cy="560"
+     inkscape:document-units="mm"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1366"
+     inkscape:window-height="715"
+     inkscape:window-x="-8"
+     inkscape:window-y="-8"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata13">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Calque 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     style="display:inline">
+    <image
+       y="55.265312"
+       x="-19.604364"
+       id="image26"
+       xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAG1BMVEXZK/r1rVn4t2z0okTvjh0W kgJ2Ylfyly3Wdwn05yRUAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsT AQCanBgAAAAHdElNRQfiBAIPJiFMOqolAAAAsElEQVRIx+3UPQ6CQBCGYSpju0eAyp5CD7DFXmDp DXGwh2QsiY1zbGf/xJ9QMQKJvpHEZJ6ChOTLsn9DG4DwZ0uxbwDOXwrXjqhfJTgTXYuQUopeiQiw FfApV66SO8gCOFkXv8gxgD3i5fmDyAD3VFCXPgadNrMDvvKvQWxnAYjygLPeNJhaHUgIEug0Jw7C dtwewHysyHQQjY6ZtwEQAmkG+U60GBjWuB9d/ungN7sDoYJS3KLTvjwAAAAASUVORK5CYII= "
+       style="opacity:1;fill:#008000;image-rendering:optimizeQuality"
+       preserveAspectRatio="none"
+       height="228.077"
+       width="228.022" />
+  </g>
+</svg>
diff --git a/ext_icon.gif b/ext_icon.gif
deleted file mode 100644 (file)
index 37abb9f..0000000
Binary files a/ext_icon.gif and /dev/null differ
index aca90ce..61acfd0 100644 (file)
@@ -1,34 +1,42 @@
 <?php
 defined('TYPO3_MODE') or die();
 
-if (TYPO3_MODE == 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
-       /**
-        * Registers a Backend Module
-        */
-       // GDlib is a requirement for the Font Maker module
-       if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib']) {
-               // SJBR\SrFreecap\Domain\Model\Font uses declare(encoding='ISO-8859-2') which, since PHP 5.4, requires zend.multibyte to be set to On'.
-               // However, this has to be set in php.ini, .htaccess, httpd.conf or .user.ini, because the setting zend.multibyte is of type PHP_INI_PERDIR
-               // See http://php.net/manual/en/configuration.changes.modes.php
-               if (ini_get('zend.multibyte')) {
-                       \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
-                               'SJBR.sr_freecap',
-                               // Make module a submodule of 'tools'
-                               'tools',
-                               // Submodule key
-                               'FontMaker',
-                               // Position
-                               '',
-                               // An array holding the controller-action combinations that are accessible
-                               [
-                                       'FontMaker' => 'new,create'
-                               ],
-                               [
-                                       'access' => 'user,group',
-                                       'icon' => 'EXT:sr_freecap/Resources/Public/Images/moduleicon.gif',
-                                       'labels' => 'LLL:EXT:sr_freecap/Resources/Private/Language/locallang_mod.xlf'
-                               ]
-                       );
+call_user_func(
+    function($extKey)
+    {
+               if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
+                       /**
+                        * Registers a Backend Module
+                        */
+                       // GDlib is a requirement for the Font Maker module
+                       if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib']) {
+                               // SJBR\SrFreecap\Domain\Model\Font uses declare(encoding='ISO-8859-2') which, since PHP 5.4, requires zend.multibyte to be set to On'.
+                               // However, this has to be set in php.ini, .htaccess, httpd.conf or .user.ini, because the setting zend.multibyte is of type PHP_INI_PERDIR
+                               // See http://php.net/manual/en/configuration.changes.modes.php
+                               if (ini_get('zend.multibyte')) {
+                                       \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
+                                               'SJBR.' . $extKey,
+                                               // Make module a submodule of 'tools'
+                                               'tools',
+                                               // Submodule key
+                                               'FontMaker',
+                                               // Position
+                                               '',
+                                               // An array holding the controller-action combinations that are accessible
+                                               [
+                                                       'FontMaker' => 'new,create'
+                                               ],
+                                               [
+                                                       'access' => 'user,group',
+                                                       'icon' => 'EXT:sr_freecap/Resources/Public/Icons/Extension.svg',
+                                                       'labels' => 'LLL:EXT:sr_freecap/Resources/Private/Language/locallang_mod.xlf'
+                                               ]
+                                       );
+                                       // Add module configuration setup
+                                       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($extKey, 'setup', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $extKey . '/Configuration/TypoScript/FontMaker/setup.typoscript">');
+                               }
+                       }
                }
-       }
-}
\ No newline at end of file
+       },
+       'sr_freecap'
+);
\ No newline at end of file