Skip to content

Basic Conventions

Basic Conventions

This is the list of naming conventions the B2B Suite complies to:

GroupPractice
DI ContainerAll container ids look like b2b_*.*
The first asterisk is the component name
The second asterisk is a class name abbreviation
DatabaseAll table names start with b2b_
All table names are in singular
All field and table names are in snake case
AttributesAll attribute names start with swag_b2b_
SubscriberAll subscriber methods are named in accordance with their function, not to the event
TestsAll test methods are in snake case
All test methods start with test_
TemplatesAll new layout modules are wrapped in b2b--* class containers
Modules reuse the template style of Shopware
CSS SelectorsThree levels of selector depth as max
Twig Blocks{% block b2b_* %}{% endblock %} empty blocks are in one line
JavaScriptThe B2B Suite is written in TypeScript
Storefront pluginsFile names end with *.plugin.ts
InterfacesFile names start with I, e.g., IAjaxPanelEvent.ts
SnippetsThe root snippet key is b2b