CreateTopicController.inc 446 B

1234567891011121314151617181920
  1. <?php
  2. class CreateTopicController implements IController {
  3. public function execute() {
  4. $session = new Session();
  5. $view = new View();
  6. $headRenderer = new HeadRenderer();
  7. $userId = $session->getValue("logged_in");
  8. $viewData = array(
  9. "header" => $headRenderer->render()
  10. );
  11. if($userId){
  12. return $view->render("createTopicView.inc", $viewData);
  13. } else {
  14. return $view->render("logInPromptView.inc", $viewData);
  15. }
  16. }
  17. }