View Single Post
  #2  
Old 11-06-2016, 11:45 AM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 65,968
Dinocanid is on a distinguished road
Default

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($nameLinkedList $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)
__________________

Last edited by Dinocanid; 11-06-2016 at 11:50 AM.
Reply With Quote