/**
  * @param Form $form
  * @param $values
  */
 public function insertTaskGroupFromSuccess(Form $form, $values)
 {
     $taskGroupEntity = new TaskGroup();
     $taskGroupEntity->setName($values->name);
     $this->taskGroupRepository->insert($taskGroupEntity);
     $this->presenter->flashMessage('Task group was created', 'success');
     $this->redirect('this');
 }
 public function __construct(EntityManager $entityManager)
 {
     parent::__construct($entityManager);
     $this->taskGroup = $this->entityManager->getRepository(Entity\TaskGroup::getClassName());
 }