protected function updateDependantObjects()
    {
        // Skip live stage
        if (class_exists(Versioned::class) && Versioned::get_stage() === Versioned::LIVE) {
            return;
        }

        // Need to flush cache to avoid outdated versionnumber references
        $this->flushCache();

        // Trigger update of all parent owners on change
        /** @var DataObject|FileLinkTracking $object */
        foreach ($this->BackLinkTracking() as $object) {
            // Update sync link tracking
            $object->syncLinkTracking();
            if ($object->isChanged()) {
                $object->write();
            }
        }
    }
protected function updateDependantObjects()
    {
        // Skip live stage
        if (class_exists(Versioned::class) && Versioned::get_stage() === Versioned::LIVE) {
            return;
        }

        // Need to flush cache to avoid outdated versionnumber references
        $this->flushCache();

        // Trigger update of all parent owners on change
        /** @var DataObject|FileLinkTracking $object */
        foreach ($this->BackLinkTracking() as $object) {
            // Update sync link tracking
            $object->syncLinkTracking();
            if ($object->isChanged()) {
                $object->write();
            }
        }
    }
protected function updateDependantObjects ( ) { // Skip live stage if ( class_exists ( Versioned :: class ) && Versioned :: get_stage ( ) === Versioned :: LIVE ) { return ; } // Need to flush cache to avoid outdated versionnumber references $ this -> flushCache ( ) ; // Trigger update of all parent owners on change /** @var DataObject|FileLinkTracking $object */ foreach ( $ this -> BackLinkTracking ( ) as $ object ) { // Update sync link tracking $ object -> syncLinkTracking ( ) ; if ( $ object -> isChanged ( ) ) { $ object -> write ( ) ; } } }
Update objects linking to this file
Update objects linking to this file