Hyper Open Edge Cloud

Guideline Only Site Wide Script Uses ERP5Site Prefix

This should be an exception.
  • Last Update:2017-04-06
  • Version:001
  • Language:en

Only Site Wide Script Uses ERP5Site Prefix

Scripts that apply to the whole site or don't need a specific context can be prefixed with ERP5Site_

ERP5Site_getModuleItemList
ERP5Site_reindexAll

However, most scripts do apply to a well defined context. It is essential for naming clarity and logic to find out which context is applicable.

Good Example:

Field_getTranslatedTitle
Form_getTranslatedTitle
Document_validateRequiredFile

Bad Example:

ERP5Site_getFieldTranslatedTitle
ERP5Site_getFormTranslatedTitle
ERP5Site_validateRequiredFile