src/snac/data/AbstractData.php
/**
     * Update SCM Citations
     *
     * Goes through the SCMs attached to this data object and updates any with citation
     * oldSource to use citation newSource instead.
     *
     * @param  \snac\data\Source $oldSource Source to replace
     * @param  \snac\data\Source $newSource Source to replace with
     */
Update SCM Citations
Goes through the SCMs attached to this data object and updates any with citation
oldSource to use citation newSource instead.


Update SCM Citations Goes through the SCMs attached to this data object and updates any with citation oldSource to use citation newSource instead .
public function updateSCMCitation($oldSource, $newSource=null) {
        if ($oldSource === null) {
            return;
        }
        if (isset($this->dateList) && $this->dateList !== null) {
            foreach ($this->dateList as &$date) {
                $date->updateSCMCitation($oldSource, $newSource);
            }
        }
        if (isset($this->snacControlMetadata) && $this->snacControlMetadata !== null) {
            foreach ($this->snacControlMetadata as &$scm) {
                if ($scm->getCitation() !== null && $scm->getCitation()->getID() == $oldSource->getID()) {
                    $scm->setCitation($newSource);
                }
            }
        }
    }
public function updateSCMCitation ( $ oldSource , $ newSource = null ) { if ( $ oldSource === null ) { return ; } if ( isset ( $ this -> dateList ) && $ this -> dateList !== null ) { foreach ( $ this -> dateList as & $ date ) { $ date -> updateSCMCitation ( $ oldSource , $ newSource ) ; } } if ( isset ( $ this -> snacControlMetadata ) && $ this -> snacControlMetadata !== null ) { foreach ( $ this -> snacControlMetadata as & $ scm ) { if ( $ scm -> getCitation ( ) !== null && $ scm -> getCitation ( ) -> getID ( ) == $ oldSource -> getID ( ) ) { $ scm -> setCitation ( $ newSource ) ; } } } }
Update SCM Citations
 Goes through the SCMs attached to this data object and updates any with citation
 oldSource to use citation newSource instead.
Update SCM Citations Goes through the SCMs attached to this data object and updates any with citation oldSource to use citation newSource instead .