You are here

function disable_messages_install in Disable Messages 8

Same name and namespace in other branches
  1. 6 disable_messages.install \disable_messages_install()
  2. 7 disable_messages.install \disable_messages_install()
  3. 2.x disable_messages.install \disable_messages_install()

Implements hook_install().

File

./disable_messages.install, line 11
Filter Messages Module install file.

Code

function disable_messages_install() {
  $config = \Drupal::service('config.factory')
    ->getEditable('disable_messages.settings');
  $config
    ->set('disable_messages_enable', '1');
  $config
    ->set('disable_messages_ignore_patterns', '');
  $config
    ->set('disable_messages_ignore_regex', []);
  $config
    ->set('disable_messages_ignore_case', '1');
  $config
    ->set('disable_messages_filter_by_page', '0');
  $config
    ->set('disable_messages_page_filter_paths', '');
  $config
    ->set('disable_messages_exclude_users', '');
  $config
    ->set('disable_messages_enable_debug', '0');
  $config
    ->set('disable_messages_debug_visible_div', '0');
  $config
    ->save();
}