]> 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 8d653dbdec7886448bd8f2605ad7ce0aec5f61bc..ed9468ef78b769382476e9096cedc1f14c2181e0 100644 (file)
@@ -6,6 +6,7 @@ namespace Org\Mxchange\CoreFramework\Template\Engine;
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Filesystem\InvalidDirectoryException;
+use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
 use Org\Mxchange\CoreFramework\Menu\RenderableMenu;
 use Org\Mxchange\CoreFramework\Parser\Parseable;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
@@ -157,7 +158,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $templateInstance = new MenuTemplateEngine();
 
                // Get the application instance from registry
-               $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
+               $applicationInstance = ApplicationHelper::getSelfInstance();
 
                // Determine base path
                $templateBasePath = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/';
@@ -391,7 +392,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         */
        private function initMenu (string $templateDependency = '') {
                // Get web template engine
-               $this->setTemplateInstance(ObjectFactory::createObjectByConfiguredName('html_template_class', array(GenericRegistry::getRegistry()->getInstance('application'))));
+               $this->setTemplateInstance(ObjectFactory::createObjectByConfiguredName('html_template_class', array(ApplicationHelper::getSelfInstance())));
 
                // Handle the dependency template
                $this->handleTemplateDependency('menu', $templateDependency);
@@ -889,7 +890,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         */
        public function getMenuCacheFile () {
                // Get the application instance from registry
-               $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
+               $applicationInstance = ApplicationHelper::getSelfInstance();
 
                // Get the file instance ready
                $fileInstance = new SplFileInfo(sprintf('%s%smenus/_cache/%s.%s',