プラグインの雛形は以下コマンドで生成。
bin/console eccube:plugin:generate
bin/console eccube:plugin:install --code=プラグインコード
bin/console eccube:plugin:enable --code=プラグインコード
eccube:plugin:generate
実行結果のサンプル
EC-CUBE Plugin Generator Interactive Wizard
===========================================
name [EC-CUBE Sample Plugin]:
> プラグイン名
code [Sample]:
> プラグインコード
ver [1.0.0]:
> 1.0.0
なお、プラグインの最小構成は以下の通りです。
app/Plugin/プラグインコード/composer.json
{
"name": "ec-cube/プラグインコード",
"version": "1.0.0",
"description": "プラグイン名",
"type": "eccube-plugin",
"require": {
"ec-cube/plugin-installer": "~0.0.6"
},
"extra": {
"code": "プラグインコード"
}
}