You are here

function hosting_log_types in Hosting 7.4

Same name and namespace in other branches
  1. 7.3 hosting.module \hosting_log_types()

Return a list of log entry types.

2 calls to hosting_log_types()
hosting_settings in ./hosting.module
General settings form.
_hosting_task_log_table in task/hosting_task.module
Display table containing the logged information for this task.

File

./hosting.module, line 1328
Hosting module.

Code

function hosting_log_types() {
  $known_types = [
    'error',
    'info',
    'message',
    'notice',
    'ok',
    'status',
    'success',
    'warning',
  ];
  $types_from_logs = db_query('SELECT DISTINCT type FROM {hosting_task_log}')
    ->fetchCol();
  $types = array_unique(array_merge($known_types, $types_from_logs));
  return array_combine($types, $types);
}