I'm sorry, but I just don't get it.  I am only passing TWO arguments
to $Html-link and it works.  I looked at $Html-link and it doesn't
seem to do any parameter counting.  I understand your point about me
only passing two parameters, but please tell me why it works when
calling $Html-link.

//use of Html-link
echo $html->link( 'linkTitle', array('controller'=>'candidates',
'action'=>'index') );
//Html-link method signature taken from html.php
function link($title, $url = null, $htmlAttributes = array(),
$confirmMessage = false, $escapeTitle = true) {


On Mar 22, 11:15 am, brian <bally.z...@gmail.com> wrote:
> Again, you're only passing 2 params to your method--the title, and the
> URL array. You aren't passing anything for $htmlAttributes, so it
> defaults to the empty array.
>
> On Sat, Mar 21, 2009 at 10:07 PM, welzie <wel...@gmail.com> wrote:
>
> > 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 <bally.z...@gmail.com> wrote:
> >> On Fri, Mar 20, 2009 at 11:35 PM, welzie <wel...@gmail.com> 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 cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to