/**
  * action delete
  *
  * @param \HeikoHardt\T3eeVotingExample\Domain\Model\Topic $topic
  * @return void
  */
 public function deleteAction(\HeikoHardt\T3eeVotingExample\Domain\Model\Topic $topic)
 {
     $this->addFlashMessage('The topic was deleted.
          Please be aware that this action is publicly accessible unless you implement an access check.
          See http://wiki.typo3.org/T3Doc/Extension_Builder/Using_the_Extension_Builder#1._Model_the_domain', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR);
     $this->topicRepository->remove($topic);
     $this->redirect('list');
 }
 /**
  * @Given there is a topic labeled :topicLabel having :attendeeCount votes
  */
 public function thereIsATopicLabeledHavingVotes($topicLabel, $attendeeCount)
 {
     $topic = new Topic();
     $topic->setIssue($topicLabel);
     $topic->setPid(1);
     for ($i = 0; $i < $attendeeCount; $i++) {
         $attendee = new Attendee();
         $attendee->setName('Example Name ' . ($i + 1));
         $attendee->setEmail('example' . ($i + 1) . '@domain.com');
         $attendee->setPid(1);
         $topic->addAttendee($attendee);
     }
     // add topic
     $this->topicRepository->add($topic);
     // persist topic
     $this->typo3PersistenceManager->persistAll();
 }