class BuildController extends Moave_Controller { /** * The default action - show the home page */ public function init() { parent::init(); $this->users = new Users(); } public function indexAction() { if($this->access->view) { $builder = new Building(); $men = new Men(); $userID = $this->user->id; $buildings = $builder->find($userID)->current(); $this->view->buildings = $buildings->toArray(); $mens = $men->find($userID)->current(); $tester = $buildings->findBuildingByUser(); $tester2 = $mens->findMenByUser(); //$this->view->mens = $mens->toArray(); Zend_Debug::Dump($mens->toArray()); $this->view->content = $this->view->render('build/index.tpl'); $this->view->mainmenu = $this->view->render('mainmenu.tpl'); $this->view->sitebar_left = $this->view->render('sitebar_left.tpl'); $this->view->addScript(array('/scripts/mootools.js', '/scripts/buildings.js')); $this->view->addStyle('/styles/building.css'); $this->view->display('main.tpl'); } }