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

Module helpers are static classes that we use to encapsulate functions specific to the module. Incorporating the functions in a static class reduces the chance of conflict with other extensions and the core.

We normally name module helper classes using the naming convention: the word mod, the module name, and the word Helper. For example, our helper class will be called modCriticsChoiceHelper.

Module helper classes are normally located in a file called helper.php in the root of the module. So after creating the helper.php file, we define our class modCriticsChoiceHelper and create a method called getList():

<?php  /** * Boxoffice Critics Choice Module * * @package mod_criticschoice * @subpackage modules * @link http://www.packtpub.com * @license ...

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