Created
October 28, 2011 02:27
-
-
Save monsat/1321479 to your computer and use it in GitHub Desktop.
Using custom helpers (components) by CakePHP2.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class AppController extends Controller { | |
public $helpers = array( | |
'Text' => array('className' => 'AppText'), | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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