Fill in the blanks – where to start and how to do them
1. Entry Point
The entry point of each component is standard:
[COMPONENT_NAME].php
and for backend modules, it is also possible to use
admin.[COMPONENT_NAME].php
to be the entry point.
The purpose of the entry point is very simple, initiate the correct controller and execute the task. See below for a very typical entry point file:
Another important function for the entry point file is to register any path for any JTable, JModel that are not in standard location, or not in standard file names, for example, when you want to have JTables to be places in the front end component:
JTable::addIncludePath(JPATH_COMPONENT.DS.’tables’);
This “addIncludePath” method is available for both JTable and JModel, but please do not mix up.
For JModel, alternatively, the search path can be added by calling JController::addModelPath method, but eventually, it is still done by calling the JModel::addIncludePath.
2. Toolbars
For backend module, it is advisable to follow the Joomla default UI configuration, in this way, users are presented with a consistent UI experience, prevent mistakes and reduce training complexity.
One of the key features of Joomla backend UI is its Toolbar:
To program this, actually it is quite easy, especially if you are using the common toolbar tasks like:
- save
- add
- delete
- publish
- preferences
We do not even need to specify the icon to be used. The complete list of methods available are listed below:
We can see for many of the methods, there are 2 different version: one with ‘X’ and one without ‘X’. What is the difference?
For the versions with an “X” in the end, the official comment says something like this:
Extended version of *** calling hideMainMenu() before submitbutton().
Hiding the menu prevents the page from being navigate away easily in doing the task, and gives people a “transaction” kind of feeling.
What happen is, all the buttons represent a “task” in your controller, upon clicked, the task will be “executed” on the specific controller.
How should we use the JToolBarHelper class? TO BE CONTINUED.





