In previous and subsequent chapters, we have and will discuss creating subclasses by extending Joomla! core classes. In addition to these classes, we may want to define our own unique classes.
As we will discuss in Chapter 5, Component Design, the Model-View-Controller is a very good design pattern for creating systems quickly and easily. However, it is not, nor is it intended to be, all encompassing. It should come as no surprise that many components contain supporting classes. The core component that deals with menus is a prime example. This component defines two additional classes, iLink
and iLinkNode
. A tree representation of a menu is built using these classes.
When we create classes such as these, it is a common practice to place them in a special folder called classes
. When creating a component, we place this folder in the backend.
Supporting classes can extend existing Joomla! classes. For example, the JObject
class. They can also be completely unrelated and separate...