You are here

public static function BrightcoveUtil::getApiClient in Brightcove Video Connect 3.x

Same name and namespace in other branches
  1. 8.2 src/BrightcoveUtil.php \Drupal\brightcove\BrightcoveUtil::getApiClient()
  2. 8 src/BrightcoveUtil.php \Drupal\brightcove\BrightcoveUtil::getApiClient()

Gets BrightcoveAPIClient entity.

Parameters

string $entity_id: The entity ID of the BrightcoveAPIClient.

Return value

\Drupal\brightcove\Entity\BrightcoveAPIClient Loaded BrightcoveAPIClient object.

4 calls to BrightcoveUtil::getApiClient()
BrightcoveUtil::getClient in src/BrightcoveUtil.php
Gets Brightcove client.
BrightcoveUtil::getDefaultPlayer in src/BrightcoveUtil.php
Helper function to get default player for the given entity.
BrightcoveVideo::delete in src/Entity/BrightcoveVideo.php
BrightcoveVideoController::ingestionCallback in src/Controller/BrightcoveVideoController.php
Ingestion callback for Brightcove.

File

src/BrightcoveUtil.php, line 79

Class

BrightcoveUtil
Utility class for Brightcove.

Namespace

Drupal\brightcove

Code

public static function getApiClient($entity_id) {

  // Load BrightcoveAPIClient if it wasn't already.
  if (!isset(self::$apiClients[$entity_id])) {
    self::$apiClients[$entity_id] = BrightcoveAPIClient::load($entity_id);
  }
  return self::$apiClients[$entity_id];
}