![Laminas Navigator,在插件管理器 Laminas\View\HelperPluginManager 中未找到名为“navigation”的插件](https://linux22.com/image/747159/Laminas%20Navigator%EF%BC%8C%E5%9C%A8%E6%8F%92%E4%BB%B6%E7%AE%A1%E7%90%86%E5%99%A8%20Laminas%5CView%5CHelperPluginManager%20%E4%B8%AD%E6%9C%AA%E6%89%BE%E5%88%B0%E5%90%8D%E4%B8%BA%E2%80%9Cnavigation%E2%80%9D%E7%9A%84%E6%8F%92%E4%BB%B6.png)
在我的 Laminas 网站上,我想使用 Navigatorframework。我遵循本教程,但我失败了。
/ - 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
有什么想法吗?我应该改变什么?
答案1
我忘记清理缓存了:rm /var/www/html/data/cache/*
然后它就起作用了。
答案2
配置加载模块(组件):层板\导航在模块.配置.php
https://docs.laminas.dev/laminas-navigation/quick-start/#register-laminas-navigation-as-module