PHP code example of heimrichhannot / contao-youtube-bundle

1. Go to this page and download the library: Download heimrichhannot/contao-youtube-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

heimrichhannot / contao-youtube-bundle example snippets


$templateData = [
    // ...
    'youtubeVideos' => [
        'youtubeField' => [ // The selected youtube field name from config element
            'video' => '' // Generated default template,
            'data' => [] // Video data for custom templates
        ]
    ]
]

 if($this->youtube && $this->youtube->video):