function hook_default_message_template in Message 8
Define default message template configurations.
Return value
array An array of default message templates, keyed by machine names.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
See also
hook_default_message_template_alter()
File
- ./
message.api.php, line 77 - Hooks provided by the Message module.
Code
function hook_default_message_template() {
$defaults['main'] = \Drupal::entityTypeManager()
->getStorage('message_template')
->create([]);
return $defaults;
}