如果您的插件名称为Demo
那么目录结构为:
plugins/
DemoPlugin/
Biz/
Dao/
Service/
Controller/
Migrations/
Resources/
Scripts/
database.sql
InstallScript.php
DemoPlugin.php
plugin.json
即插件目录下的plugin.json
:
{
"code": "Demo",
"name": "演示插件",
"description": "这是一个演示插件",
"author": "EduSoho官方",
"version": "1.0.0",
"support_version": "7.2.0"
}
即插件目录下的DemoPlugin.php
:
<?php
namespace DemoPlugin;
use Codeages\PluginBundle\System\PluginBase;
class DemoPlugin extends PluginBase
{
}
DemoPlugin
类必须继承自Codeages\PluginBundle\System\PluginBase
类。
** 注册 **
app/console plugin:register Demo
** 注销 **
app/console plugin:remove Demo