Developer Guide - Important hints for developers
Editions: Enterprise, Ultimate, Corporate
Versions: all
Versions: all
With the editions VIMP Enterprise, Enterprise Ultimate and Corporate you are eligible to modify the source code of VIMP.
This is necessary, if you wanto to customize certain functions or add new functions to the software.
In order to maintain VIMP's updatebility you have to pay attention to some basic rules which we are going to explain in the following.
First of all, we assume that you're already familiar with the symfony framework and gained developer experience with it.
VIMP uses symonfy version 1.4 and Propel as ORM.
General guidelines:
- Code indents have to be done with two white-spaces, not with tabs
- Basic classes (if existing) are not supposed to be modified
- Extensions should always be developed as symfony plugins
- Texts and strings within the code and templates are to be translated with the i18n functions
- i18n texts are to be inserted into the according i18n/messages.*.xml files within the plugin folders
- Modifications and extensions of the schema have to be created within the according YaML files of the plugin subfolder config/
- Fixtures that are supposed to be loaded at initialization are to be saved within the data/fixtures folder of the plugin
- Files belonging to the web/ folder have to be linked via a symlink from the plugin folder
- New permissions can be created in the permissions.yml file within the config/ folder of the plugin
- For sending e-mails the stMail class should be used
- Custom actions and components are to be placed in the "default" action and component classes, not into the base classes
- The default culture check is to be carried out with the sf_default_culture parameter, not with a particular language
General plugin structure:
config |
YaML files for schema, permissions, etc. |
data |
|
fixtures |
Fixtures for initialization |
sql |
SQL files with required SQL statements |
lib |
Classes for forms, widgets, validators, etc. that are used all over the plugin |
modules |
Folder of plugin modules |
templates |
Folder of plugin templates |
INSTALL |
Text file with installation notes |
UPDATE |
Text file with update notes |
Folder can be created only, if they are used.
General module structure:
actions |
Action and components classes |
base |
Action and component base classes |
lib |
Classes for forms, widgets, validators, etc. |
templates |
Template files of the module |
Folder can be created only, if they are used.
Model Classes:
- a is*() function must be created for each possible value of a status field
- for static values of a field according class constants are to be created
- changes of a status field must be carried out by the according function of the class
Last update on 2018/09/06 by Admin.