The most useful tools for recurrent HTML generation: the Helper classes
The Helper
classes are defined in the /classes/helper/
folder and enable us to generate useful recurrent BO views, such as edition forms with HelperForm
, or entity elements listing tables with HelperList
. Other Helper
classes exist, such as HelperCalendar
, HelperImageUploader
, HelperKpi
, HelperKpiRow
, HelperOptions
, and so on, but we won’t cover all of them because the aim of this book is to show you the way to understand how everything is articulated and to be able to create your own modules following those design patterns.
The parent class for all the Helper
objects is defined in the /classes/helper/Helper.php
file by the HelperCore
object. The final aim will be to use the generate()
method to return the HTML content requested.
Generating an edition form with HelperForm
The HelperForm
object is a child object of Helper
, and it is used to generate an HTML form by calling its generateForm($fields_form...