function fb_instant_articles_update_8201 in Facebook Instant Articles 8.2
Same name and namespace in other branches
- 3.x fb_instant_articles.install \fb_instant_articles_update_8201()
Change the enable_logging setting to transformer_logging_level.
File
- ./
fb_instant_articles.install, line 13 - Install and update hooks.
Code
function fb_instant_articles_update_8201() {
$config = \Drupal::configFactory()
->getEditable('fb_instant_articles.settings');
$enable_logging = $config
->get('enable_logging');
if ($enable_logging) {
$config
->set('transformer_logging_level', TransformerLog::ERROR);
}
else {
$config
->set('transformer_logging_level', TransformerLog::OFF);
}
$config
->clear('enable_logging');
$config
->save();
}