Source of file VideoEmbedPageExtesion.php
Size: 0,683 Bytes - Last Modified: 2021-12-24T06:49:09+00:00
/var/www/docs.ssmods.com/process/src/code/extensions/VideoEmbedPageExtesion.php
12345678910111213141516171819202122232425 | <?php class VideoEmbedPageExtesion extends DataExtension { /** * @example in template: $FlexSlider(2, 960, 450) */ public function VideoEmbed($ID = 1, $width = null, $height = null, $autoplay = null) { /* @var $VideoEmbed VideoEmbed */ $VideoEmbed = is_numeric($ID) ? VideoEmbed::get()->byID($ID) : VideoEmbed::get()->where("Title LIKE '" . $ID . "'")->First(); if ($width) { $VideoEmbed->setWidth($width); } if ($height) { $VideoEmbed->setHeight($height); } if (!is_null($autoplay)) { $VideoEmbed->setAutoPlay($autoplay); } return $VideoEmbed; } } |