<?php
namespace Boab\CmsBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Boab\CmsBundle\Entity\Content;
/**
* Serminar
* @ORM\Table(name="video")
* @ORM\Entity(repositoryClass="Boab\CmsBundle\Repository\ContentRepository")
*/
class Video extends Content implements VideoInterface
{
/**
* @var string
*
* @ORM\Column(name="youtube_video_id", type="string", length=255, precision=0, scale=0, nullable=false, unique=false)
*/
private $youtubeVideoId;
/**
* Set youtubeVideoId
*
* @param string $youtubeVideoId
* @return Video
*/
public function setYoutubeVideoId($youtubeVideoId)
{
$this->youtubeVideoId = $youtubeVideoId;
return $this;
}
/**
* Get youtubeVideoId
*
* @return string
*/
public function getYoutubeVideoId()
{
return $this->youtubeVideoId;
}
public function getVideoUrl()
{
return sprintf('http://www.youtube.com/watch?v=%s', $this->getYoutubeVideoId());
}
}