public function loadJournalPage() { $journal = $this->em->getRepository(Journal::class)->find(1); $entity = new JournalPage(); $entity->setCurrentLocale('tr')->setTitle('Title')->setSlug('title-page')->setBody('Content')->setVisible(true)->setTags('tag')->setJournal($journal); $this->em->persist($entity); $this->em->flush(); return $entity->getId(); }