ApplicationDelegate.php method

Archived from the Xataface Developers forum.

siggj — Sun Sep 26, 2010 11:26 am

Hello !

I have a dashboard which works perfectly.

I want to try something in the dashboard and it doesnt work.

In fact, in the dashboard i have :

Code: Select all
{block name="for_group"}

Then i have define a method in the ApplicationDelegate.php

Code: Select all
function block__for_group(){      echo 'Groups'; }

This works perfectly.

Now I modify the code in the ApplicationDelegate.php like :

Code: Select all
function block__for_group(){       echo 'Groups';       echo getGroup();        }         function getGroup(){        return 'Hello, how are you ? ';     }

But it doesnt work.. Anybody can say me something about this ?

Thank you !


shannah — Mon Sep 27, 2010 9:56 am

Your getGroup() method is defined inside the delegate class it looks like. Therefore you can’t call it like a global function. You have to call it like:

Code: Select all
$this->getGroup();