我创建" BlocksHelper"在我的自定义插件中,但我无法使用它而不会出现致命错误。有什么问题?
插件/为myplugin / SRC /视图/助手/ BlocksHelper.php:
namespace myPlugin\View\Helper;
use Cake\View\Helper;
class BlockHelper extends Helper{
}
bootstrap.php中:
...
Plugin::load(myPlugin, ['autoload' => true]);
查看/ AppView.php:
class AppView extends View
{
public function initialize()
{
parent::initialize();
$this->loadHelper('myPlugin.Blocks');
...
}
}