function bibcite_entity_update_8008 in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_entity/bibcite_entity.install \bibcite_entity_update_8008()
Disable reference type field for all view modes.
File
- modules/
bibcite_entity/ bibcite_entity.install, line 284 - Module installation hooks implementation.
Code
function bibcite_entity_update_8008() {
$config_factory = \Drupal::configFactory();
foreach ($config_factory
->listAll('core.entity_view_display.bibcite_reference') as $config_name) {
$config = $config_factory
->getEditable($config_name);
$content = $config
->get('content');
unset($content['bibcite_type']);
$config
->set('content', $content);
$hidden = $config
->get('hidden');
$hidden['bibcite_type'] = TRUE;
$config
->set('hidden', $hidden);
$config
->save(TRUE);
}
}