MediaType/BaseMediaType.php
public function getPreview(MediaInterface $media, array $options = null)
    {
        $self_options = array('html' => array('class' => array(self::NAME)));

        if (is_array($options)) {
            $options = array_merge_recursive($options, $self_options);
        } else {
            $options = $self_options;
        }

        $name = $this->getMediaName();

        if (!$name) {
            $name = basename($media->getMediaTypeReference());
        }

        $html = '<a href="/media/'.$media->getMediaTypeReference().'" target="_blank" class="'.implode(' ', $options['html']['class']).'" >'.$name.'</a>';

        return $html;
    }
public function getPreview(MediaInterface $media, array $options = null)
    {
        $self_options = array('html' => array('class' => array(self::NAME)));

        if (is_array($options)) {
            $options = array_merge_recursive($options, $self_options);
        } else {
            $options = $self_options;
        }

        $name = $this->getMediaName();

        if (!$name) {
            $name = basename($media->getMediaTypeReference());
        }

        $html = '<a href="/media/'.$media->getMediaTypeReference().'" target="_blank" class="'.implode(' ', $options['html']['class']).'" >'.$name.'</a>';

        return $html;
    }
@param MediaInterface $media
@param array|null     $options

@return string