我正在尝试将条款和条件插件集成到我的 sylius 插件https://github.com/Setono/SyliusTermsPlugin中。我在网格包之前添加插件,但总是出现此错误“您请求了一个不存在的参数“setono_sylius_terms.model.terms.class”。这是我的代码:# config/bundles.php Setono\SyliusTermsPlugin\SetonoSyliusTermsPlugin::class => ['all' => true], Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true]# config/packages/_sylius.yaml - { resource: "@SetonoSyliusTermsPlugin/Resources/config/app/config.yaml" }# config/routes.yamlsetono_sylius_terms_shop: resource: "@SetonoSyliusTermsPlugin/Resources/config/shop_routing.yaml" prefix: /{_locale} requirements: _locale: ^[a-z]{2}(?:_[A-Z]{2})?$setono_sylius_terms_admin: resource: "@SetonoSyliusTermsPlugin/Resources/config/admin_routing.yaml" prefix: /admin#vendor\setono\sylius-terms-plugin\src\Resources\config\grids sylius_grid: grids: setono_sylius_terms_terms: driver: name: doctrine/orm options: class: "%setono_sylius_terms.model.terms.class%"问题出在这次课堂上,请任何人都可以帮助我。谢谢。
1 回答
慕娘9325324
TA贡献1783条经验 获得超4个赞
此参数由SyliusResourceBundle设置,因此请确保在任何其他插件Sylius\Bundle\ResourceBundle\SyliusResourceBundle
之前设置SyliusTermsPlugin
。
作为一般规则,它应该是:
// config/bundles.php
<?php
return [
// ...
Sylius\Bundle\ResourceBundle\SyliusResourceBundle::class => ['all' => true],
// All Sylius plugins
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
// ...
];
- 1 回答
- 0 关注
- 114 浏览
添加回答
举报
0/150
提交
取消