Ejemplo n.º 1
0
 /**
  * Handler for the publication change event.
  *
  * @param MetaPublication $p_oldPublication
  * @param MetaPublication $p_newPublication
  */
 private function setPublicationHandler(MetaPublication $p_oldPublication, MetaPublication $p_newPublication)
 {
     static $publicationHandlerRunning = false;
     if ($publicationHandlerRunning || $p_newPublication->same_as($p_oldPublication)) {
         return;
     }
     $publicationHandlerRunning = true;
     if ($p_newPublication->defined() && !$this->getLanguage()->defined()) {
         $this->setLanguageHandler($this->getLanguage(), $p_newPublication->default_language);
     }
     $this->setIssueHandler($this->getIssue(), new MetaIssue());
     $this->m_readonlyProperties['url']->publication = $p_newPublication;
     $this->m_objects['publication'] = $p_newPublication;
     $publicationHandlerRunning = false;
 }