I forgot to include the method signature for the Html helper link
method, which is the exact same as the signature for my helper
method. That is why I was so confused because the call to that method
works and the call to my method with the SAME exact signature does NOT
work. Is there some magic that I'm missing?
Here are the two method signatures.
function link($title, $url = null, $htmlAttributes = array(),
$confirmMessage = false, $escapeTitle = true) {
function createLinkIfAuthorized($title, $url = null, $htmlAttributes =
array(), $confirmMessage = false, $escapeTitle = true) {
Here are the two usages. Again the call to my method does NOT work.
echo $html->link( 'linkTitle', array('controller'=>'candidates',
'action'=>'index') );
echo $simpleAuthorization->createLinkIfAuthorized( 'linkTitle', array
('controller'=>'candidates', 'action'=>'index') );
On Mar 21, 9:47 am, brian <[email protected]> wrote:
> On Fri, Mar 20, 2009 at 11:35 PM, welzie <[email protected]> wrote:
>
> > The call to my helper method that does NOT work.
> > <?php
> > echo $simpleAuthorization->createLinkIfAuthorized( 'linkTitle', array
> > ('controller'=>'candidates', 'action'=>'index') );
> > ?>
>
> called with 2 params ...
>
>
>
> > My helper class (not all methods are shown)::
> > <?php
> > class SimpleAuthorizationHelper extends Helper {
>
> > var $helpers = array('Session', 'Html');
>
> > function createLinkIfAuthorized($title, $url = null,
> > $htmlAttributes = array(), $confirmMessage = false, $escapeTitle =
> > true) {
>
> ... 4 params, htmlAttributes is 3rd
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---