CampContext::setIssueHandler PHP Method

setIssueHandler() private method

Handler for the issue change event.
private setIssueHandler ( MetaIssue $p_oldIssue, MetaIssue $p_newIssue )
$p_oldIssue MetaIssue
$p_newIssue MetaIssue
    private function setIssueHandler(MetaIssue $p_oldIssue, MetaIssue $p_newIssue)
    {
        static $issueHandlerRunning = false;
        if (!$this->m_readonlyProperties['preview'] && !$p_newIssue->is_published && $p_newIssue->defined()) {
            return;
        }
        if ($issueHandlerRunning || $p_newIssue->same_as($p_oldIssue)) {
            return;
        }
        $issueHandlerRunning = true;
        if ($p_newIssue->defined() && !$this->getPublication()->same_as($p_newIssue->publication)) {
            $this->setPublicationHandler($this->getPublication(), $p_newIssue->publication);
        }
        if ($p_newIssue->defined() && !$this->getLanguage()->same_as($p_newIssue->language)) {
            $this->setLanguageHandler($this->getLanguage(), $p_newIssue->language);
        }
        $this->setSectionHandler($this->getSection(), self::$m_nullMetaSection);
        $this->m_readonlyProperties['url']->issue = $p_newIssue;
        $this->m_objects['issue'] = $p_newIssue;
        $issueHandlerRunning = false;
    }