You are here

function hook_regcode_presave in Registration codes 8

Same name and namespace in other branches
  1. 7.2 regcode.api.php \hook_regcode_presave()
  2. 7 regcode.api.php \hook_regcode_presave()

Called when a new registration code is created.

1 invocation of hook_regcode_presave()
regcode_save in ./regcode.module
Saves code in the database and calls the regcode_presave hook.

File

./regcode.api.php, line 60
Example hook functions for hooks provided by the core regcode module.

Code

function hook_regcode_presave($code) {
  if ($code) {
    \Drupal::messenger()
      ->addStatus(t('The code "@code" was created.', [
      '@code' => $code,
    ]));
  }
}