0
我想更改我的config.yml的值 我需要将其从DefaultController.php中更改,但我不知道这是否可能(以及是否有可能如何去做吧)。如何在Symfony中更改控制器中的YAML值
的YAML文件
google:
enabled: true # If Google Authenticator should be enabled, default false
server_name: Zioo # Server name used in QR code
issuer: Zioo # Issuer name used in QR code
template: ZPAdminBundle:Authentication:form.html.twig # Template used to render the authentication form
我需要从defaultcontroller更改“已启用”为false时,用户不希望使用此选项。
关于配置涉及的绑定的信息也不错。您不能在运行时实际修改YAML配置,但在大多数情况下,该捆绑包将填充可从容器访问的值对象。虽然这可能仍然不起作用,因为捆绑可能在你的控制器之前完成了它的职责。所以请提供捆绑信息,那么你可能会得到一些答案。 –
感谢您的回应! 该文档可以在这里找到:https://github.com/scheb/two-factor-bundle/blob/master/Resources/doc/configuration.md 但是我找不到任何有关启用/禁用“启用”选项 –