From 51edb1b58b4ab8acce14d4d0ed486348ec8c66a3 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 25 May 2020 12:12:23 -0700 Subject: [PATCH] Updated e107 Coding Standard (markdown) --- e107-Coding-Standard.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/e107-Coding-Standard.md b/e107-Coding-Standard.md index 31df103..6dae5d1 100644 --- a/e107-Coding-Standard.md +++ b/e107-Coding-Standard.md @@ -82,6 +82,20 @@ class myplugin_shortcodes extends e_shortcode } ``` +``` +class news_form_ui extends e_admin_form_ui +{ + + function news_template($curVal,$mode) + { + if($mode === 'read') + { + return $curVal; + } + + // ... +``` + Routines are to be documented at both file and function level using phpDoc syntax. Where appropriate create supplementary pages of general documentation, and document individual variables. When passing more than three or so parameters to a function, consider passing some of them in an array (especially convenient if many are optional) or if within a class, consider using vars.