/** * @param waViewAction|string $action */ public function setAction($action) { if ($action instanceof waViewAction) { $action->setController($this); } $this->action = $action; }
/** * Execute action $action and save result to array $this->blocks * * @param waViewAction $action * @param waDecorator $decorator * @param string $name */ public function executeAction(waViewAction $action, $name = 'content', waDecorator $decorator = null) { $action->setController($this); $content = $decorator ? $decorator->display($action) : $action->display(); if (isset($this->blocks[$name])) { $this->blocks[$name] .= $content; } else { $this->blocks[$name] = $content; } }