O'Reilly logo

Mastering Joomla! 1.5 Extension and Framework Development by Chuck Lanham, James Kennard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Helpers

Helpers are static classes used to perform common functions. Helpers often complement another class. For example, the static JToolBarHelper helper class works in conjunction with the JToolBar class.

Note

There are forty-nine helper classes in the Joomla! core alone. For more information, go to http://api.joomla.org/li_Joomla-Framework.html.

When we are building helpers that complement another class, the functions that we place within the helpers must relate to the other class.

Imagine we have a class named SomeItem, which deals with an itemized entity. If each item were to have a category, we might want to get a list of those categories especially for use with the item.

Placing a method to do this in the SomeItem class is questionable because ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required