protected function getReferencedFile($serial)
    {
        try {
            $file = $this->getFileReferenceSerializer()->unserialize($serial);
            if ($file instanceof File && $file->exists()) {
                return $file;
            }
        } catch (\Exception $e) {
            // do nothing
        }

        return null;
    }
protected function getReferencedFile($serial)
    {
        try {
            $file = $this->getFileReferenceSerializer()->unserialize($serial);
            if ($file instanceof File && $file->exists()) {
                return $file;
            }
        } catch (\Exception $e) {
            // do nothing
        }

        return null;
    }
protected function getReferencedFile ( $ serial ) { try { $ file = $ this -> getFileReferenceSerializer ( ) -> unserialize ( $ serial ) ; if ( $ file instanceof File && $ file -> exists ( ) ) { return $ file ; } } catch ( \ Exception $ e ) { // do nothing } return null ; }
Tries to get the referenced file if it exists.

@param string $serial
@return null|File
Tries to get the referenced file if it exists .