function jw_player_update_8001 in JW Player 8
Initialize settings.
File
- ./
jw_player.install, line 58 - Install, update and uninstall functions for the JW Player module.
Code
function jw_player_update_8001() {
$config = \Drupal::configFactory()
->getEditable('jw_player.settings');
if ($config
->get('account_token')) {
\Drupal::messenger()
->addStatus(t('JW Player has changed its way to run cloud hosted players. Please update your configuration at /admin/config/media/jw_player/settings if you are using a cloud hosted player.'));
$config
->clear('account_token');
}
$config
->set('jw_player_version', 6);
\Drupal::messenger()
->addStatus(t('JW Player version has been set to 6.'));
$config
->save();
}