Magento:2“传递的参数必须是 Customeractivation 的实例”
Magento : 2 “Argument passed must be an instance of Customeractivation”
我有一个模块,如"Customeractivation"。
在"customeractivation" Observer 文件中,我想调用"customeractivation" 模块的helper class 的一些方法。
但是,当我将依赖项注入构造方法时,出现以下错误。
传递的参数必须是 Customeractivation 的实例”
尝试在低于 2.2 的 magento 版本中使用 rm -rf var/generation/* 命令删除旧生成的文件,并在 magento 根目录中对 2.2 以上的 Magento 使用 rm -rf generated/*。
我有一个模块,如"Customeractivation"。
在"customeractivation" Observer 文件中,我想调用"customeractivation" 模块的helper class 的一些方法。 但是,当我将依赖项注入构造方法时,出现以下错误。 传递的参数必须是 Customeractivation 的实例”
尝试在低于 2.2 的 magento 版本中使用 rm -rf var/generation/* 命令删除旧生成的文件,并在 magento 根目录中对 2.2 以上的 Magento 使用 rm -rf generated/*。