function adci_contact_info_install in Brainstorm profile 8
Implements hook_install().
File
- module/
custom/ adci_contact_info/ adci_contact_info.install, line 13 - Install, update and uninstall functions for the ADCI Contact Info module.
Code
function adci_contact_info_install() {
$config = \Drupal::configFactory();
$theme_name = $config
->get('system.theme')
->get('admin');
$values = [
'id' => 'adci_contact_info_block',
'language' => 'en',
'theme' => $theme_name,
'region' => 'header',
'weight' => -9999,
'visibility' => [],
'plugin' => 'adci_contact_info_block',
'settings' => [
'id' => 'adci_contact_info_block',
'label' => t('ADCI Solutions contact information'),
'label_display' => 0,
],
];
$block = Block::create($values);
$block
->save();
}