Well just putting the function in the class file alone won't make it show up, you have to go to the view file for that. Then you could add something like:
PHP Code:
$document->add(new Comment("Trophies: {$adopt->getTrophies()}"));
If you're talking about the stats page that shows the random adoptables (I get it mixed up with levelup sometimes ^^;), then you would add something like:
PHP Code:
<?php
use Resource\Native\String;
use Resource\Collection\LinkedList;
class StatsView extends View{
public function index(){
$mysidia = Registry::get("mysidia");
$document = $this->document;
$document->setTitle($this->lang->title);
$document->addLangvar($this->lang->default.$this->lang->top10.$this->lang->top10_text);
$document->add($this->getTable("top10", $this->getField("top10")));
$document->addLangvar($this->lang->random.$this->lang->random_text);
$document->add($this->getTable("rand5", $this->getField("rand5")));
}
private function getTable($name, LinkedList $list){
$table = new TableBuilder($name);
$table->setAlign(new Align("center", "middle"));
$table->buildHeaders("Adoptable Image", "Adoptable Name", "Adoptable Owner", "Total Clicks", "Current Level", "Trophies"); #edited this part
$table->setHelper(new AdoptTableHelper);
$iterator = $list->iterator();
while($iterator->hasNext()){
$adopt = $iterator->next();
$cells = new LinkedList;
$cells->add(new TCell($table->getHelper()->getLevelupLink($adopt)));
$cells->add(new TCell($adopt->getName()));
$cells->add(new TCell($table->getHelper()->getOwnerProfile($adopt->getOwner())));
$cells->add(new String($adopt->getTotalClicks()));
$cells->add(new TCell($adopt->getCurrentLevel()));
$cells->add(new TCell($adopt->getTrophies())); #added this part
$table->buildRow($cells);
}
return $table;
}
}
?>
(No need to replace everything, just the parts I commented)