There was a problem loading the comments.

Developer Guide - Important hints for developers

Support Portal  »  Knowledgebase (FAQ)  »  Viewing Article

  Print
Editions: Enterprise, Ultimate, Corporate
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.

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

 

Folders 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

 

Folders 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

Share via

Related Articles

© VIMP GmbH