Newscoop\Entity\Repository\AutoIdRepository::getNextTranslationPhraseId PHP Метод

getNextTranslationPhraseId() публичный Метод

Get next translations phrase Id.
public getNextTranslationPhraseId ( ) : integer
Результат integer
    public function getNextTranslationPhraseId()
    {
        $em = $this->getEntityManager();
        $result = $em->getRepository('Newscoop\\Entity\\AutoId')->findAll();
        $autoId = $result[0];
        $autoId->setTranslationPhraseId($autoId->getTranslationPhraseId() + 1);
        $em->flush();
        return $autoId->getTranslationPhraseId();
    }