You are here

public static function BrightcoveSubscription::loadDefault in Brightcove Video Connect 8.2

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

Loads the default subscription by API Client ID.

Parameters

\Drupal\brightcove\Entity\BrightcoveAPIClient $api_client: Loaded API Client entity.

Return value

\Drupal\brightcove\Entity\BrightcoveSubscription|null The default Brightcove Subscription for the given API client or NULL if not found.

Throws

\Drupal\brightcove\Entity\Exception\BrightcoveSubscriptionException

5 calls to BrightcoveSubscription::loadDefault()
BrightcoveAPIClientDeleteForm::submitForm in src/Form/BrightcoveAPIClientDeleteForm.php
This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…
BrightcoveSubscription::save in src/Entity/BrightcoveSubscription.php
BrightcoveSubscriptionController::createDefaults in src/Controller/BrightcoveSubscriptionController.php
Creates default subscriptions.
BrightcoveSubscriptionController::listSubscriptions in src/Controller/BrightcoveSubscriptionController.php
Lists available Brightcove Subscriptions.
brightcove_update_8109 in ./brightcove.install
Migrate config entity subscriptions.

File

src/Entity/BrightcoveSubscription.php, line 259

Class

BrightcoveSubscription
Defines the Brightcove Subscription entity.

Namespace

Drupal\brightcove\Entity

Code

public static function loadDefault(BrightcoveAPIClient $api_client) {
  return self::loadByField('default', $api_client
    ->id());
}