Camp.php
/**
     * Make amp-youtube component
     * @param string id Youtube video id
     * @param array attrs List of element attributes
     * @return object amp-youtube node
     */
Make amp-youtube component
@param string id Youtube video id
@param array attrs List of element attributes
@return object amp-youtube node
Make amp - youtube component @param string id Youtube video id @param array attrs List of element attributes @return object amp - youtube node
private function _makeAmpYoutube($id, $attrs){
        unset($attrs['src']);
        if(isset($attrs['frameborder']))
            unset($attrs['frameborder']);
        $attrs['data-videoid'] = $id;
        $attrs['layout'] = 'responsive';
        $amp_youtube = $this->doc->createElement('amp-youtube');
        $this->_setAttribute($amp_youtube, $attrs);
        $this->_addComponent('amp-youtube');
        return $amp_youtube;
    }
private function _makeAmpYoutube ( $ id , $ attrs ) { unset ( $ attrs [ 'src' ] ) ; if ( isset ( $ attrs [ 'frameborder' ] ) ) unset ( $ attrs [ 'frameborder' ] ) ; $ attrs [ 'data-videoid' ] = $ id ; $ attrs [ 'layout' ] = 'responsive' ; $ amp_youtube = $ this -> doc -> createElement ( 'amp-youtube' ) ; $ this -> _setAttribute ( $ amp_youtube , $ attrs ) ; $ this -> _addComponent ( 'amp-youtube' ) ; return $ amp_youtube ; }
Make amp-youtube component
 @param string id Youtube video id
 @param array attrs List of element attributes
 @return object amp-youtube node
Make amp - youtube component @param string id Youtube video id @param array attrs List of element attributes @return object amp - youtube node