You are here

cms_core.install in Glazed CMS Core 8

Same filename and directory in other branches
  1. 7 cms_core.install

Install, update and uninstall functions for the CMS Core module.

File

cms_core.install
View 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

Namesort descending Description
cms_core_install Implements hook_install().