检查是否已从帮助程序类安装并启用特定插件的最佳方法是什么?
我的帮助程序类具有插件依赖性,我想仔细检查该插件是否已安装并启用,完成此操作的最佳方法是什么?
我尝试过使用 ProjectConfiguration::getActive()
方法,但我似乎找不到我要找的东西。
My helper class has a plugin-dependecy and I'd like to double check if that plugin is installed and enabled, what is the best way to accomplish this?
I have tried using ProjectConfiguration::getActive()
methods, but I can't seem to find what I am looking for.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过使用
ProjectConfiguration::getPlugins()
?它应该返回一个包含已加载插件的数组。Have you tried with
ProjectConfiguration::getPlugins()
? It should return an array with loaded plugins.作为解决方案,我在我的
ProjectConfiguration
类中添加了以下函数:我很惊讶默认情况下这还没有包含在 symfony 1.4 中。
As a solution I have added the following function to my
ProjectConfiguration
class:I was suprised that this isn't already included in symfony 1.4 by default.