cms_core.install in Glazed CMS Core 8
Same filename and directory in other branches
Install, update and uninstall functions for the CMS Core module.
File
cms_core.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the CMS Core module.
*/
use Drupal\contact\Entity\ContactForm;
/**
* Implements hook_install().
*/
function cms_core_install() {
$site_mail = Drupal::config('system.site')
->get('mail');
ContactForm::load('cms_contact')
->setRecipients([
$site_mail,
])
->trustData()
->save();
Drupal::configFactory()
->getEditable('contact.settings')
->set('default_form', 'cms_contact')
->save();
}
Functions
Name![]() |
Description |
---|---|
cms_core_install | Implements hook_install(). |