public setJournal ( |
||
$journal | ||
return |
public function setJournal(Journal $journal = null)
{
$this->journal = $journal;
return $this;
}
/** * @return int */ public function loadJournalIndex() { $journal = $this->em->getRepository(Journal::class)->find(1); $index = $this->em->getRepository(Index::class)->find(1); $entity = new JournalIndex(); $entity->setIndex($index); $entity->setLink('http://ojs.io'); $entity->setJournal($journal); $this->em->persist($entity); $this->em->flush(); return $entity->getId(); }