You are here

function _mentions_set_default_config in Open Social 10.0.x

Same name and namespace in other branches
  1. 8.9 modules/custom/mentions/mentions.install \_mentions_set_default_config()
  2. 8 modules/custom/mentions/mentions.install \_mentions_set_default_config()
  3. 8.2 modules/custom/mentions/mentions.install \_mentions_set_default_config()
  4. 8.3 modules/custom/mentions/mentions.install \_mentions_set_default_config()
  5. 8.4 modules/custom/mentions/mentions.install \_mentions_set_default_config()
  6. 8.5 modules/custom/mentions/mentions.install \_mentions_set_default_config()
  7. 8.6 modules/custom/mentions/mentions.install \_mentions_set_default_config()
  8. 8.7 modules/custom/mentions/mentions.install \_mentions_set_default_config()
  9. 8.8 modules/custom/mentions/mentions.install \_mentions_set_default_config()
  10. 10.3.x modules/custom/mentions/mentions.install \_mentions_set_default_config()
  11. 10.1.x modules/custom/mentions/mentions.install \_mentions_set_default_config()
  12. 10.2.x modules/custom/mentions/mentions.install \_mentions_set_default_config()

Set default settings.

1 call to _mentions_set_default_config()
mentions_install in modules/custom/mentions/mentions.install
Implements hook_install().

File

modules/custom/mentions/mentions.install, line 21
Install, update and uninstall functions for the mentions module.

Code

function _mentions_set_default_config() {
  $config = \Drupal::configFactory()
    ->getEditable('mentions.settings');
  $supported_entity_types = [
    'node',
    'comment',
    'taxonomy_term',
    'user',
  ];
  $supported_entity_types = array_combine($supported_entity_types, $supported_entity_types);
  $config
    ->set('supported_entity_types', $supported_entity_types);
  $config
    ->save();
}