public setIndex ( Ojs\JournalBundle\Entity\Index $index ) : |
||
$index | Ojs\JournalBundle\Entity\Index | |
return |
public function setIndex(Index $index)
{
$this->index = $index;
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(); }