You are here

function brightcove_update_8102 in Brightcove Video Connect 8

Same name and namespace in other branches
  1. 8.2 brightcove.install \brightcove_update_8102()
  2. 3.x brightcove.install \brightcove_update_8102()

Update BrightcoveAPIClient config entity's schema.

File

./brightcove.install, line 156
Brightcove install file.

Code

function brightcove_update_8102() {
  $config_factory = \Drupal::configFactory();
  foreach ($config_factory
    ->listAll('brightcove.brightcove_api_client.') as $brightcove_api_client_config) {
    $config = $config_factory
      ->getEditable($brightcove_api_client_config);
    $config
      ->clear('access_token');
    $config
      ->clear('access_token_expire_date');
    $config
      ->save(TRUE);
  }
  drupal_flush_all_caches();
}