/** * @return void */ public function indexAction() { if (!$this->authenticationProviderManager->isAuthenticated()) { $this->redirect('index', 'Login'); } $this->view->assign('users', $this->userRepository->findAll()); $this->view->assign('activeUser', $this->userRepository->findActiveUser()); }
/** * @param string $tweetContent * @return void */ public function newAction($tweetContent) { $newTweet = new Tweet(); $newTweet->setContent($tweetContent); $newTweet->setAuthor($this->userRepository->findActiveUser()); $this->createAction($newTweet); $this->redirect('index', 'User'); }