public function runDashboardView(TBGRequest $request) { $view = new TBGDashboardView($request['view_id']); if ($view->getTargetType() == TBGDashboardView::TYPE_PROJECT) { TBGContext::setCurrentProject(new TBGProject($view->getProjectID())); } return $this->renderJSON(array('content' => $this->returnComponentHTML($view->getTemplate(), array('view' => $view)))); }