src/models/StorageFilter.php
public function removeImageSources()
    {
        $log = [];
        foreach (StorageImage::find()->where(['filter_id' => $this->id])->all() as $img) {
            $source = $img->serverSource;
            $image = $img->delete();
            
            $log[$source] = $image;
        }
        
        return $log;
    }
public function removeImageSources()
    {
        $log = [];
        foreach (StorageImage::find()->where(['filter_id' => $this->id])->all() as $img) {
            $source = $img->serverSource;
            $image = $img->delete();
            
            $log[$source] = $image;
        }
        
        return $log;
    }
public function removeImageSources ( ) { $ log = [ ] ; foreach ( StorageImage :: find ( ) -> where ( [ 'filter_id' => $ this -> id ] ) -> all ( ) as $ img ) { $ source = $ img -> serverSource ; $ image = $ img -> delete ( ) ; $ log [ $ source ] = $ image ; } return $ log ; }
Remove image sources of the file.
Remove image sources of the file .