You are here

public function BrightcoveVideo::getPoster in Brightcove Video Connect 8.2

Same name and namespace in other branches
  1. 8 src/Entity/BrightcoveVideo.php \Drupal\brightcove\Entity\BrightcoveVideo::getPoster()
  2. 3.x src/Entity/BrightcoveVideo.php \Drupal\brightcove\Entity\BrightcoveVideo::getPoster()

Returns the video's poster image.

Return value

array The poster image on the entity.

Overrides BrightcoveVideoInterface::getPoster

1 call to BrightcoveVideo::getPoster()
BrightcoveVideo::setPoster in src/Entity/BrightcoveVideo.php
Sets the video's poster image.

File

src/Entity/BrightcoveVideo.php, line 452

Class

BrightcoveVideo
Defines the Brightcove Video entity.

Namespace

Drupal\brightcove\Entity

Code

public function getPoster() {
  $values = $this
    ->get('poster')
    ->getValue();
  if (empty($values[0]['target_id'])) {
    return NULL;
  }
  $this
    ->provideDefaultValuesForImageField($values);
  return $values[0];
}