/**
* @param Journal $formerlyKnownAsJournal
*
* @return $this
*/
public function setFormerlyKnownAsJournal($formerlyKnownAsJournal)
{
$oldFormerlyKnownAsJournal = $this->formerlyKnownAsJournal;
$this->formerlyKnownAsJournal = $formerlyKnownAsJournal;
if ($formerlyKnownAsJournal instanceof Journal && empty($formerlyKnownAsJournal->getContinuedAsJournal())) {
$formerlyKnownAsJournal->setContinuedAsJournal($this);
} elseif (empty($formerlyKnownAsJournal) && !empty($oldFormerlyKnownAsJournal)) {
$formerlyKnownAsJournal->setContinuedAsJournal(null);
}
return $this;
}