code/dataobjects/CdnImage.php
protected function deleteResamplings() {
        $children = ContentServiceAsset::get()->filter('SourceID', $this->ID);

        $numDeleted = 0;
        foreach ($children as $child) {
            $child->SourceID = -1;

            // we _DONT_ do a hard delete; if content has this image cached, it should be able to
            // hold it for a while. Instead, mark deleted and allow a cleanup job to collect it later
            $child->Filename = 'deleted';
            $child->write();
            $numDeleted++;
        }

        $this->Resamplings = array();
        return $numDeleted;
    }
protected function deleteResamplings() {
        $children = ContentServiceAsset::get()->filter('SourceID', $this->ID);

        $numDeleted = 0;
        foreach ($children as $child) {
            $child->SourceID = -1;

            // we _DONT_ do a hard delete; if content has this image cached, it should be able to
            // hold it for a while. Instead, mark deleted and allow a cleanup job to collect it later
            $child->Filename = 'deleted';
            $child->write();
            $numDeleted++;
        }

        $this->Resamplings = array();
        return $numDeleted;
    }
protected function deleteResamplings ( ) { $ children = ContentServiceAsset :: get ( ) -> filter ( 'SourceID' , $ this -> ID ) ; $ numDeleted = 0 ; foreach ( $ children as $ child ) { $ child -> SourceID = - 1 ; // we _DONT_ do a hard delete; if content has this image cached, it should be able to // hold it for a while. Instead, mark deleted and allow a cleanup job to collect it later $ child -> Filename = 'deleted' ; $ child -> write ( ) ; $ numDeleted ++ ; } $ this -> Resamplings = array ( ) ; return $ numDeleted ; }
Mark content service assets as being deleted, and reset our Resamplings value
for update later

@return int
Mark content service assets as being deleted and reset our Resamplings value for update later