/** * @param \T3DD\Backend\Domain\Model\Session $session * @return void */ protected function isValid($session) { if ($this->sessionRepository->countByTitle($session->getTitle())) { $this->addError('There is already a session with this title', 1424730006); } }