<?php

/**
 * @file
 */

use Drupal\dblog\DbLogFilters;

/**
 * Gathers a list of uniquely defined database log message types.
 *
 * @return array
 *   List of uniquely defined database log message types.
 *
 * @deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service(\Drupal\dblog\DbLogFilters::class)->getMessageTypes() instead.
 * @see https://www.drupal.org/node/3560399
 */
function _dblog_get_message_types() {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service(\Drupal\dblog\DbLogFilters::class)->getMessageTypes() instead. See https://www.drupal.org/node/3560399', E_USER_DEPRECATED);
  return \Drupal::service(DbLogFilters::class)->getMessageTypes();
}

/**
 * Creates a list of database log administration filters that can be applied.
 *
 * @return array
 *   Associative array of filters. The top-level keys are used as the form
 *   element names for the filters, and the values are arrays with the following
 *   elements:
 *   - title: Title of the filter.
 *   - where: The filter condition.
 *   - options: Array of options for the select list for the filter.
 *
 * @deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service(\Drupal\dblog\DbLogFilters::class)->filters() instead.
 * @see https://www.drupal.org/node/3560399
 */
function dblog_filters(): array {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service(\Drupal\dblog\DbLogFilters::class)->filters() instead. See https://www.drupal.org/node/3560399', E_USER_DEPRECATED);
  return \Drupal::service(DbLogFilters::class)->filters();
}
