First you need to specify name and namespace of your bundle. Symfony framework already has best practices for bundle structure and bundle name and we recommend to follow these practices and use them.

Let us assume that we want to create the AcmeDemoBundle and put it under the namespace Quimi\Bundle\OceanPayBundle in the /src directory. We need to create the corresponding directory structure and the bundle file with the following content:

For a load configuration files you need to create Service Container Extension. See Symfony Configuration Files

Create a Bundle Service Container Extension

Enable a Bundle

最后修改日期: 2024年6月28日

作者

留言

撰写回覆或留言

发布留言必须填写的电子邮件地址不会公开。