public static function BrightcoveUtil::getPmApi in Brightcove Video Connect 3.x
Same name and namespace in other branches
- 8.2 src/BrightcoveUtil.php \Drupal\brightcove\BrightcoveUtil::getPmApi()
- 8 src/BrightcoveUtil.php \Drupal\brightcove\BrightcoveUtil::getPmApi()
Gets Brightcove PM API.
Parameters
string $entity_id: BrightcoveAPIClient entity ID.
Return value
\Brightcove\API\PM Initialized Brightcove PM API.
1 call to BrightcoveUtil::getPmApi()
- BrightcoveClientQueueWorker::processItem in src/
Plugin/ QueueWorker/ BrightcoveClientQueueWorker.php - Works on a single queue item.
File
- src/
BrightcoveUtil.php, line 149
Class
- BrightcoveUtil
- Utility class for Brightcove.
Namespace
Drupal\brightcoveCode
public static function getPmApi($entity_id) {
// Create new \Brightcove\API\PM object if it is not exists yet.
if (!isset(self::$pmApis[$entity_id])) {
$client = self::getClient($entity_id);
self::$pmApis[$entity_id] = new PM($client, self::$apiClients[$entity_id]
->getAccountId());
}
return self::$pmApis[$entity_id];
}