Welcome to the Cookbook

loading...

3.11.3 Creating Functionality for All Helpers

There is no translation yet for this section. Please help out and translate this.. More information about translations

All helpers extend a special class, AppHelper (just like models extend AppModel and controllers extend AppController). To create functionality that would be available to all helpers, create /app/app_helper.php.

<?php
class AppHelper extends Helper {
    function customMethod () {
    }
}
?>
  1. <?php
  2. class AppHelper extends Helper {
  3. function customMethod () {
  4. }
  5. }
  6. ?>