Example #1
0
 /**
  * Update content of journal definition
  *
  * @param \DOMDocument $dom
  * @param Journal $journal
  * @return bool
  */
 protected function updateJournalContent(\DOMDocument $dom, Journal $journal)
 {
     $xpath = new \DOMXPath($dom);
     $defNode = $xpath->query('/journal/definition')->item(0);
     $attributes = $defNode->attributes;
     $attributes->getNamedItem('name')->nodeValue = $journal->getName()->get();
     $attributes->getNamedItem('crcy')->nodeValue = $journal->getCurrency()->getCode();
     return $dom->save($this->journalPath->get()) !== false;
 }