Skip to main content
Version: X-Cart 5.5.1

A module as a Symfony Bundle

To declare a module as a Symfony bundle, create a class <XCart>/modules/{AuthorId}/{ModuleId}/src/{ModuleId}Bundle.php.

<?php

namespace XCExample\SampleModule;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class SampleModuleBundle extends Bundle
{
}

The <XCart>/modules/{AuthorId}/{ModuleId}/config/services.yaml file is uploaded for such modules in addition to the regular bundle facilities. The upload takes place after completing the X-Cart configuration. This is required to allow the module to override the core behavior.