You are here

public function BrightcoveVideoInterface::saveImage in Brightcove Video Connect 8

Same name and namespace in other branches
  1. 8.2 src/BrightcoveVideoInterface.php \Drupal\brightcove\BrightcoveVideoInterface::saveImage()
  2. 3.x src/BrightcoveVideoInterface.php \Drupal\brightcove\BrightcoveVideoInterface::saveImage()

Helper function to save the image for the entity.

Parameters

string $type: The type of the image. Possible values are:

  • IMAGE_TYPE_THUMBNAIL: Recommended aspect ratio of 16:9 and a minimum width of 640px.
  • IMAGE_TYPE_POSTER: Recommended aspect ratio of 16:9 and a minimum width of 160px.

\Brightcove\Object\Video\Image|array $image: The image from Brightcove.

Return value

\Drupal\brightcove\BrightcoveVideoInterface The called Brightcove Video.

Throws

\Exception If the type is not matched with the possible types.

1 method overrides BrightcoveVideoInterface::saveImage()
BrightcoveVideo::saveImage in src/Entity/BrightcoveVideo.php
Helper function to save the image for the entity.

File

src/BrightcoveVideoInterface.php, line 75

Class

BrightcoveVideoInterface
Provides an interface for defining Brightcove Videos.

Namespace

Drupal\brightcove

Code

public function saveImage($type, $image);