]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/template/menu/class_MenuTemplateEngine.php
Continued:
[core.git] / framework / main / classes / template / menu / class_MenuTemplateEngine.php
index eea9843647313c20aa7038c7c930d0628b9bbf47..0bc2e03e521f7203cc50a4b74aae0d82e1b507df 100644 (file)
@@ -3,6 +3,7 @@
 namespace Org\Mxchange\CoreFramework\Template\Engine;
 
 // Import framework stuff
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filesystem\InvalidDirectoryException;
 use Org\Mxchange\CoreFramework\Menu\RenderableMenu;
@@ -154,7 +155,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
 
                // Determine base path
-               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/';
+               $templateBasePath = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
@@ -175,13 +176,13 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $templateInstance->setTemplateBasePath($templateBasePath);
 
                // Set template extensions
-               $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension'));
-               $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('menu_template_extension'));
+               $templateInstance->setRawTemplateExtension(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('raw_template_extension'));
+               $templateInstance->setCodeTemplateExtension(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('menu_template_extension'));
 
                // Absolute output path for compiled templates
                $templateInstance->setCompileOutputPath(sprintf('%s%s/',
                        $templateBasePath,
-                       $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path')
+                       FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('compile_output_path')
                ));
 
                // Set the menu instance
@@ -206,7 +207,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         */
        public function loadMenuTemplate ($template) {
                // Set template type
-               $this->setTemplateType($this->getConfigInstance()->getConfigEntry('menu_template_type'));
+               $this->setTemplateType(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('menu_template_type'));
 
                // Load the special template
                $this->loadTemplate($template);
@@ -877,7 +878,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
 
                // Get the file instance ready
                $fileInstance = new SplFileInfo(sprintf('%s%smenus/_cache/%s.%s',
-                       $this->getConfigInstance()->getConfigEntry('application_base_path'),
+                       FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('application_base_path'),
                        $applicationInstance->getAppShortName(),
                        md5(
                                $this->getMenuInstance()->getMenuName() . ':' .