function _dblog_get_message_types

Same name in other branches
  1. 7.x modules/dblog/dblog.module \_dblog_get_message_types()
  2. 9 core/modules/dblog/dblog.module \_dblog_get_message_types()
  3. 8.9.x core/modules/dblog/dblog.module \_dblog_get_message_types()
  4. 11.x core/modules/dblog/dblog.module \_dblog_get_message_types()

Gathers a list of uniquely defined database log message types.

Return value

array List of uniquely defined database log message types.

2 calls to _dblog_get_message_types()
DblogTypes::getValueOptions in core/modules/dblog/src/Plugin/views/filter/DblogTypes.php
Gets the value options.
dblog_filters in core/modules/dblog/dblog.admin.inc
Creates a list of database log administration filters that can be applied.

File

core/modules/dblog/dblog.module, line 94

Code

function _dblog_get_message_types() {
    return \Drupal::database()->query('SELECT DISTINCT([type]) FROM {watchdog} ORDER BY [type]')
        ->fetchAllKeyed(0, 0);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.