public function getEmbedCode($url, $class)
    {
        // Prepare url
        $url = $this->setProtocolToHttps($url);
        // Get method
        $method = $this->getMethod($url);
        if ($method !== null) {
            $embedUrl = $this->{$method}($url);
            if ($embedUrl) {
                return '<iframe ' . GeneralUtility::implodeAttributes([
                        'class' => $class,
                        'src' => $embedUrl,
                        'frameborder' => 0
                    ], true) . ' allowfullscreen></iframe>';
            }
        }
        return null;
    }
public function getEmbedCode($url, $class)
    {
        // Prepare url
        $url = $this->setProtocolToHttps($url);
        // Get method
        $method = $this->getMethod($url);
        if ($method !== null) {
            $embedUrl = $this->{$method}($url);
            if ($embedUrl) {
                return '<iframe ' . GeneralUtility::implodeAttributes([
                        'class' => $class,
                        'src' => $embedUrl,
                        'frameborder' => 0
                    ], true) . ' allowfullscreen></iframe>';
            }
        }
        return null;
    }
public function getEmbedCode ( $ url , $ class ) { // Prepare url $ url = $ this -> setProtocolToHttps ( $ url ) ; // Get method $ method = $ this -> getMethod ( $ url ) ; if ( $ method !== null ) { $ embedUrl = $ this -> { $ method } ( $ url ) ; if ( $ embedUrl ) { return '<iframe ' . GeneralUtility :: implodeAttributes ( [ 'class' => $ class , 'src' => $ embedUrl , 'frameborder' => 0 ] , true ) . ' allowfullscreen></iframe>' ; } } return null ; }
Get the embed code for the given url if possible
and add a css class on the iframe

@param string $url
@param string $class
@return string
Get the embed code for the given url if possible and add a css class on the iframe