You are here

function bibcite_bibtex_update_8001 in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x modules/bibcite_bibtex/bibcite_bibtex.install \bibcite_bibtex_update_8001()

Set mapping of bibtex language field.

File

modules/bibcite_bibtex/bibcite_bibtex.install, line 32
Module installation hooks implementation.

Code

function bibcite_bibtex_update_8001() {
  $config_factory = \Drupal::configFactory();
  $config = $config_factory
    ->getEditable('bibcite_entity.mapping.bibtex');
  $fields = $config
    ->get('fields');
  $fields['language'] = 'bibcite_lang';
  $config
    ->set('fields', $fields);
  $config
    ->save(TRUE);
}