ApplicationDelegate.php method

A place to discuss development of the Xataface core.

ApplicationDelegate.php method

Postby 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 !
siggj
 
Posts: 12
Joined: Tue Jul 20, 2010 4:22 am

Re: ApplicationDelegate.php method

Postby 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();
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Developers

Who is online

Users browsing this forum: No registered users and 14 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved