public function BrightcoveVideo::setVideoFile in Brightcove Video Connect 8.2
Same name and namespace in other branches
- 8 src/Entity/BrightcoveVideo.php \Drupal\brightcove\Entity\BrightcoveVideo::setVideoFile()
- 3.x src/Entity/BrightcoveVideo.php \Drupal\brightcove\Entity\BrightcoveVideo::setVideoFile()
Sets the video file.
Parameters
array|null $video_file: The video file entity.
Return value
\Drupal\brightcove\BrightcoveVideoInterface The called Brightcove Video.
Overrides BrightcoveVideoInterface::setVideoFile
File
- src/
Entity/ BrightcoveVideo.php, line 409
Class
- BrightcoveVideo
- Defines the Brightcove Video entity.
Namespace
Drupal\brightcove\EntityCode
public function setVideoFile($video_file) {
$video_to_delete = $this
->getVideoFile();
if ($video_file == NULL && !empty($video_to_delete['target_id'])) {
$this
->deleteFile($video_to_delete['target_id']);
}
$this
->set('video_file', $video_file);
return $this;
}