public function isImage()
    {
        $mime = $this->getMimeType();

        // The $image_mimes property contains an array of file extensions and
        // their associated MIME types. We will loop through them and look for
        // the MIME type of the current UploadedFile.
        foreach ($this->image_mimes as $image_mime) {
            if (in_array($mime, (array)$image_mime)) {
                return true;
            }
        }

        return false;
    }
public function isImage()
    {
        $mime = $this->getMimeType();

        // The $image_mimes property contains an array of file extensions and
        // their associated MIME types. We will loop through them and look for
        // the MIME type of the current UploadedFile.
        foreach ($this->image_mimes as $image_mime) {
            if (in_array($mime, (array)$image_mime)) {
                return true;
            }
        }

        return false;
    }
public function isImage ( ) { $ mime = $ this -> getMimeType ( ) ; // The $image_mimes property contains an array of file extensions and // their associated MIME types. We will loop through them and look for // the MIME type of the current UploadedFile. foreach ( $ this -> image_mimes as $ image_mime ) { if ( in_array ( $ mime , ( array ) $ image_mime ) ) { return true ; } } return false ; }
Utility method for detecing whether a given file upload is an image.

@return bool
Utility method for detecing whether a given file upload is an image .