Skip to content

Instantly share code, notes, and snippets.

@monsat
Created October 28, 2011 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monsat/1321479 to your computer and use it in GitHub Desktop.
Save monsat/1321479 to your computer and use it in GitHub Desktop.
Using custom helpers (components) by CakePHP2.0
<?php
class AppController extends Controller {
public $helpers = array(
'Text' => array('className' => 'AppText'),
);
}
<?php
App::uses('TextHelper', 'View/Helper');
class AppTextHelper extends TextHelper {
public function autoLinkUrls($text, $htmlOptions = array()) {
// override here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment