Skip to content

Latest commit

 

History

History
24 lines (22 loc) · 3.88 KB

basic-conventions.md

File metadata and controls

24 lines (22 loc) · 3.88 KB

Basic conventions

This is the list of easy - mostly naming - conventions that the B2B-Suite complies to:

Group Practice
DI Container All container ids look like b2b_*.*
The first asterisk is the component name
The second asterisk is a class name abbreviation
Database All table names start with b2b_
All table names are in singular
All field and table names are in snake case
Attributes All attribute names start with swag_b2b_
Subscriber All subscriber methods are named in accordance to their function, not to the event
Tests All test methods are in snake case
All test methods start with test_
Templates All new layout modules are wrapped in b2b--* class containers
Modules reuse the template style of shopware
CSS Selectors 3 levels of selector depth as max
Twig Blocks {% raw %}{% block b2b_* %}{% endblock %}{% endraw %} empty blocks are in one line
JavaScript The B2B Suite is written in TypeScript
Storefront Plugins File names end with *.plugin.ts
Interfaces File names start with I, e.g. IAjaxPanelEvent.ts
Snippets The root snippet key is b2b