$this->model->get('table_name');
или
cmsCore::getModel('content')->get('table_name');
public function addStreetballteam($streetball_team){
return $this->insert('streetball_teams', $streetball_teams);
}
public function getStreetballteam($id){
return $this->getItemById('streetball_teams', $id);
}
public function getStreetballteams(){
return $this->get('streetball_teams');
}
public function getStreetballteamsCount(){
return $this->getCount('streetball_teams');
}
public function run(){
$template = cmsTemplate::getInstance();
$total = $this->model->getStreetballteamsCount();
$streetball_teams = $this->model->orderBy('i.points','DESC')->getStreetballteams();
$template->render('index', array( 'teams' => $teams,
'streetball_teams' => $streetball_teams,
'total' => $total
));
}
Мне надо вот это передать в шаблон