You are here

public function BrightcoveTextTrack::setDefault in Brightcove Video Connect 8

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

Set Text Track as default.

Parameters

bool $default: TRUE or FALSE whether is the Text Track is the default one or not.

Return value

\Drupal\brightcove\BrightcoveTextTrackInterface The called BrightcoveTextTrack entity.

Overrides BrightcoveTextTrackInterface::setDefault

File

src/Entity/BrightcoveTextTrack.php, line 212

Class

BrightcoveTextTrack
Defines the Brightcove Text Track entity.

Namespace

Drupal\brightcove\Entity

Code

public function setDefault($default) {

  // @TODO: Do some magic here to ensure only one default text track per
  // video.
  return $this
    ->set('default_text_track', $default);
}