codeages / plugin-bundle
Symfony PluginBundle
Installs: 4 329
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 9
Open Issues: 3
Type:symfony-bundle
Requires
- php: >=7.2.5
- codeages/biz-framework: ^0.12
- symfony/config: ^5.4.35
- symfony/framework-bundle: ^5.4.35
- symfony/process: ^5.4.35
- symfony/twig-bundle: ^5.4.35
- symfony/yaml: ^5.4.35
Requires (Dev)
- phpunit/phpunit: ^8.1 || ^9.1 || ^10.1
- symfony/browser-kit: ^5.4.35
- symfony/phpunit-bridge: ^5.4.35
This package is auto-updated.
Last update: 2024-11-10 07:24:34 UTC
README
README
编写一个插件
目录结构
如果您的插件名称为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