You are here

function hook_default_message_category in Message 8

Define default message template category configurations.

Return value

array An array of default message template categories, keyed by machine names.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

See also

hook_default_message_category_alter()

File

./message.api.php, line 122
Hooks provided by the Message module.

Code

function hook_default_message_category() {
  $defaults['main'] = \Drupal::entityTypeManager()
    ->getStorage('message_category')
    ->create([]);
  return $defaults;
}