Skip to main content

Code Style

CamelCase

All Toolbox Elements are written in camelcase.

Controller

  • Document\Areabrick\GoogleMap

Underscore

All Configuration Elements are written in underscore:

opendxp_toolbox:
areas:
anchor:
config_elements:
anchor_name: # underscore: in view, you'll call it with opendxp_input('anchor_name');
type: input
title: Anchor Name
config: ~
anchor_title: # underscore: in view, you'll call it with opendxp_input('anchor_title');
type: input
title: Anchor Title
config: ~

Underscore Exceptions

  • Google Maps Element, Map Options: Values must be camelcase because of the Google map configuration mapping.
  • Config Elements config Tree: Values must be camelcase because of the opendxp element configuration mapping.

Strings

  • Do not use percentage values in titles
  • Always quote your title values