Zend-Framework

Laminas Navigator,在外掛管理器 LaminasViewHelperPluginManager 中找不到名為“navigation”的外掛

  • March 15, 2020

在我的 Laminas 站點上,我想使用 Navigator 框架。我按照本教程進行操作,但失敗了。

/ - Uncaught Laminas\ServiceManager\Exception\ServiceNotFoundException: A plugin by the name "navigation" was not found in the plugin manager Laminas\View\HelperPluginManager in /var/www/html/vendor/laminas/laminas-servicemanager/src/AbstractPluginManager.php:143
Stack trace:
#0 /var/www/html/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(375): Laminas\ServiceManager\AbstractPluginManager->get('navigation', NULL)
#1 /var/www/html/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(393): Laminas\View\Renderer\PhpRenderer->plugin('navigation')
#2 /var/www/html/module/Application/view/layout/layout.phtml(18): Laminas\View\Renderer\PhpRenderer->__call('navigation', Array)
#3 /var/www/html/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(505): include('/var/www/htm...')
#4 /var/www/html/vendor/laminas/laminas-view/src/View.php(206): Laminas\View\Renderer\PhpRenderer->render(NULL)
#5 /var/www/html/vendor/laminas/laminas-mvc/src/View/Http/Default in /var/www/html/vendor/laminas/laminas-servicemanager/src/AbstractPluginManager.php on line 143

任何想法,我應該改變什麼?

我忘了清理記憶體:rm /var/www/html/data/cache/*

然後它起作用了。

載入模組(組件)的配置:modules.config.php 中Laminas\Navigation

https://docs.laminas.dev/laminas-navigation/quick-start/#register-laminas-navigation-as-module

引用自:https://serverfault.com/questions/998656