]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php
Removed obsolete parameter 'applicationInstance' from all template engines
[hub.git] / application / hub / main / template / announcement / class_XmlAnnouncementTemplateEngine.php
index f4a066fd93ef007e4770009d82a0f175e9242f03..7e952d8b27d946d490b8b1e82546c786e0ab3807 100644 (file)
@@ -69,7 +69,6 @@ class XmlAnnouncementTemplateEngine extends BaseTemplateEngine implements Compil
        /**
         * Creates an instance of the class TemplateEngine and prepares it for usage
         *
-        * @param       $applicationInstance    A manageable application
         * @return      $templateInstance               An instance of TemplateEngine
         * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
         * @throws      InvalidBasePathStringException  If $templateBasePath is no string
@@ -78,10 +77,13 @@ class XmlAnnouncementTemplateEngine extends BaseTemplateEngine implements Compil
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public static final function createXmlAnnouncementTemplateEngine (ManageableApplication $applicationInstance) {
+       public static final function createXmlAnnouncementTemplateEngine () {
                // Get a new instance
                $templateInstance = new XmlAnnouncementTemplateEngine();
 
+               // Get the application instance from registry
+               $applicationInstance = Registry::getRegistry()->getInstance('app');
+
                // Determine base path
                $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
 
@@ -270,7 +272,7 @@ class XmlAnnouncementTemplateEngine extends BaseTemplateEngine implements Compil
                // Is the template dependency set?
                if ((!empty($templateDependency)) && (!isset($this->dependencyContent[$node]))) {
                        // Get a temporay template instance
-                       $templateInstance = ObjectFactory::createObjectByConfiguredName('node_announcement_template_class', array($this->getApplicationInstance()));
+                       $templateInstance = ObjectFactory::createObjectByConfiguredName('node_announcement_template_class');
 
                        // Then load it
                        $templateInstance->loadAnnouncementTemplate($templateDependency);