Re: Modification of a helper method?
On Jun 12, 6:14 pm, saidbakr <said....@gmail.com> wrote:
> In other word,
>
> In the controller action some logic will be done and it will return
> either true or false. If it true, I need something to call the html
> helper in the view and then changing all links with title contains the
> text "Edit" or "Delete" to return null or empty string instead of html
> link.
That's not a good way to handle it. Pass your flag (true|false) to the
view:
$this->set( 'flag', $this->myLogic() );
... and then:
if ( !$flag )
{
$html->link(...)
}
Or:
if ( ( $foo['Edit'] || $foo['Delete'] ) && !$flag )
{
$html->link(...)
}
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home