You are here

public static function BrightcoveTextTrack::loadByTextTrackId in Brightcove Video Connect 8

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

Load entity by the Text Track ID.

Parameters

string $id: The ID of the Text Track provided by Brightcove.

Return value

\Drupal\brightcove\BrightcoveTextTrackInterface|null The loaded Text Track entity.

2 calls to BrightcoveTextTrack::loadByTextTrackId()
BrightcoveTextTrack::createOrUpdate in src/Entity/BrightcoveTextTrack.php
Create or update an existing text track from a Brightcove object.
BrightcoveTextTrackDeleteQueueWorker::processItem in src/Plugin/QueueWorker/BrightcoveTextTrackDeleteQueueWorker.php
Works on a single queue item.

File

src/Entity/BrightcoveTextTrack.php, line 702

Class

BrightcoveTextTrack
Defines the Brightcove Text Track entity.

Namespace

Drupal\brightcove\Entity

Code

public static function loadByTextTrackId($id) {
  $entity_ids = \Drupal::entityQuery('brightcove_text_track')
    ->condition('text_track_id', $id)
    ->execute();
  if (empty($entity_ids)) {
    return NULL;
  }
  $entity_id = reset($entity_ids);
  return self::load($entity_id);
}