This chapter will show you more details about writing common OTRS Modules.
In order to preserve the consistent development of OTRS project we have set up a few guidelines regarding style.
TAB: We use 4 spaces.
Braces examles:
if ($Condition) { Foo(); } else { Bar(); } |
while ($Condition == 1) { Foo(); } |
Names and comments are written in English.
Variables, Objects and Methods must be descriptive nouns or noun phrases with the first letter uppercase (e. g. '@TicketIDs' or '$Output' or 'BuildQueueView()').
Attach the following header to each source file.
# -- # (file name) - a short decription what it does. # Copyright (C) (year) (name of author) (email of author) # -- # $Id: developer-guide.sgml,v 1.2 2004/03/28 11:13:47 martin Exp $ # -- # This software comes with ABSOLUTELY NO WARRANTY. For details, see # the enclosed file COPYING for license information (GPL). If you # did not receive this file, see http://www.gnu.org/licenses/gpl.txt. |