/** * Método que define a URL do vídeo de apresentação. * * @param Url $videoApresentacao * * @return Disciplina */ public function setVideoApresentacao(Youtube $videoApresentacao) { if (!$videoApresentacao->isYoutube(true)) { throw new DisciplinaException('O vídeo informado não é válido. ' . 'Deve ser informado um vídeo do Youtube'); } $videoApresentacao->toEmbed(); $this->videoApresentacao = $videoApresentacao; return $this; }
/** * Método que define a URL do vídeo de apresentação * @param \GGE\Lib\Filter\Types\Url $videoApresentacao * @return \Kernel\Modelo\Disciplina\Disciplina */ public function setVideoApresentacao(\GGE\Lib\Filter\Types\SUb\Youtube $videoApresentacao) { if (!$videoApresentacao->isYoutube(true)) { throw new \Kernel\Exception\DisciplinaException("O vídeo informado não é válido. " . "Deve ser informado um vídeo do Youtube"); } $videoApresentacao->toEmbed(); $this->videoApresentacao = $videoApresentacao; return $this; }