src/Sulu/Bundle/MediaBundle/Twig/DispositionTypeTwigExtension.php
public function getMediaUrl(Media $media, $dispositionType = null)
    {
        $url = $media->getUrl();

        if (ResponseHeaderBag::DISPOSITION_INLINE === $dispositionType) {
            $url .= (false === strpos($url, '?') ? '?inline=1' : '&inline=1');
        } elseif (ResponseHeaderBag::DISPOSITION_ATTACHMENT === $dispositionType) {
            $url .= (false === strpos($url, '?') ? '?inline=0' : '&inline=0');
        }

        return $url;
    }
public function getMediaUrl(Media $media, $dispositionType = null)
    {
        $url = $media->getUrl();

        if (ResponseHeaderBag::DISPOSITION_INLINE === $dispositionType) {
            $url .= (false === strpos($url, '?') ? '?inline=1' : '&inline=1');
        } elseif (ResponseHeaderBag::DISPOSITION_ATTACHMENT === $dispositionType) {
            $url .= (false === strpos($url, '?') ? '?inline=0' : '&inline=0');
        }

        return $url;
    }
public function getMediaUrl ( Media $ media , $ dispositionType = null ) { $ url = $ media -> getUrl ( ) ; if ( ResponseHeaderBag :: DISPOSITION_INLINE === $ dispositionType ) { $ url .= ( false === strpos ( $ url , '?' ) ? '?inline=1' : '&inline=1' ) ; } elseif ( ResponseHeaderBag :: DISPOSITION_ATTACHMENT === $ dispositionType ) { $ url .= ( false === strpos ( $ url , '?' ) ? '?inline=0' : '&inline=0' ) ; } return $ url ; }
Get media url.

@param Media $media
@param null|string $dispositionType

@return string
Get media url .