Illustration.php
public function deleteFiles()    {
        $fileName = $this->_model->{$this->attribute};
        if (! empty($fileName)) {

            $size = $this->cropSize;

            if ($this->sizeSteps && $size > 0)    {
                $minSize = $size >> ($this->sizeSteps - 1);
                while ($size >= $minSize)  {
                    $path = $this->imgBaseDir . DIRECTORY_SEPARATOR . $size . DIRECTORY_SEPARATOR . $fileName;
                    if (file_exists($path)) unlink($path);

                    $size >>= 1;
                }
            }
            else    {
                $path = $this->imgBaseDir . DIRECTORY_SEPARATOR . $fileName;
                if (file_exists($path)) unlink($path);
            }
            $this->_model->{$this->attribute} = null;
            if (! is_numeric($this->aspectRatio)) $this->_model->{$this->aspectRatio} = null;
        }
    }
public function deleteFiles()    {
        $fileName = $this->_model->{$this->attribute};
        if (! empty($fileName)) {

            $size = $this->cropSize;

            if ($this->sizeSteps && $size > 0)    {
                $minSize = $size >> ($this->sizeSteps - 1);
                while ($size >= $minSize)  {
                    $path = $this->imgBaseDir . DIRECTORY_SEPARATOR . $size . DIRECTORY_SEPARATOR . $fileName;
                    if (file_exists($path)) unlink($path);

                    $size >>= 1;
                }
            }
            else    {
                $path = $this->imgBaseDir . DIRECTORY_SEPARATOR . $fileName;
                if (file_exists($path)) unlink($path);
            }
            $this->_model->{$this->attribute} = null;
            if (! is_numeric($this->aspectRatio)) $this->_model->{$this->aspectRatio} = null;
        }
    }
public function deleteFiles ( ) { $ fileName = $ this -> _model -> { $ this -> attribute } ; if ( ! empty ( $ fileName ) ) { $ size = $ this -> cropSize ; if ( $ this -> sizeSteps && $ size > 0 ) { $ minSize = $ size >> ( $ this -> sizeSteps - 1 ) ; while ( $ size >= $ minSize ) { $ path = $ this -> imgBaseDir . DIRECTORY_SEPARATOR . $ size . DIRECTORY_SEPARATOR . $ fileName ; if ( file_exists ( $ path ) ) unlink ( $ path ) ; $ size >>= 1 ; } } else { $ path = $ this -> imgBaseDir . DIRECTORY_SEPARATOR . $ fileName ; if ( file_exists ( $ path ) ) unlink ( $ path ) ; } $ this -> _model -> { $ this -> attribute } = null ; if ( ! is_numeric ( $ this -> aspectRatio ) ) $ this -> _model -> { $ this -> aspectRatio } = null ; } }
Delete image files and clear imgAttribute
Delete image files and clear imgAttribute