You are here

function event_log_track_taxonomy_taxonomy_vocabulary_insert in Events Log Track 8.2

Same name and namespace in other branches
  1. 8 event_log_track_taxonomy/event_log_track_taxonomy.module \event_log_track_taxonomy_taxonomy_vocabulary_insert()

Implements hook_taxonomy_vocabulary_insert().

File

event_log_track_taxonomy/event_log_track_taxonomy.module, line 23
Logs menu CUD commands in the event_log_track module.

Code

function event_log_track_taxonomy_taxonomy_vocabulary_insert($vocabulary) {
  $log = [
    'type' => 'taxonomy',
    'operation' => 'vocabulary insert',
    'description' => t('%title (%name)', [
      '%title' => $vocabulary
        ->get('name'),
      '%name' => $vocabulary
        ->get('vid'),
    ]),
    'ref_char' => $vocabulary
      ->get('vid'),
  ];
  event_log_track_insert($log);
}