[BUGFIX] Expose IconFactory in ModuleTemplate rather than AbstractModule 98/43798/2
authorMathias Schreiber <mathias.schreiber@wmdb.de>
Sun, 4 Oct 2015 19:31:09 +0000 (21:31 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Sun, 4 Oct 2015 20:22:00 +0000 (22:22 +0200)
Releases: master
Resolves: #70359
Change-Id: I5c4845bb4162c6a520cf150b83cdcdc2807d7cd9
Reviewed-on: http://review.typo3.org/43798
Reviewed-by: Josef Glatz <jousch@gmail.com>
Tested-by: Josef Glatz <jousch@gmail.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/backend/Classes/Module/AbstractModule.php
typo3/sysext/backend/Classes/Template/ModuleTemplate.php

index 901f3e9..c49dea4 100644 (file)
@@ -37,18 +37,10 @@ class AbstractModule {
        protected $moduleTemplate;
 
        /**
-        * IconFactory object
-        *
-        * @var IconFactory
-        */
-       protected $iconFactory;
-
-       /**
         * Constructor Method
         */
        public function __construct() {
                $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
-               $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
        }
 
        /**
index 2113991..ca8d251 100644 (file)
@@ -183,13 +183,22 @@ class ModuleTemplate {
        }
 
        /**
+        * Set title tag
+        *
         * @param string $title
         */
        public function setTitle($title) {
                $this->title = $title;
        }
 
-
+       /**
+        * Returns the IconFactory
+        *
+        * @return IconFactory
+        */
+       public function getIconFactory() {
+               return $this->iconFactory;
+       }
 
        /**
         * Class constructor