You are here

function hook_quail_api_get_display_levels in Quail API 7

Define quail api display levels.

This allows for custom modules to define their own quail api display levels or alter an existing display level.

Parameters

$display_levels: An array of standards that is returned to the caller.

$display_level: (optional) A number representing the display level. When defined, the return value to only contain the display level that matches this string. When undefined, all display levels will be loaded into the display_levels array.

$other_arguments: (optional) Array of additional arguments.

The display_levels array has the following structure:

  • display level: An array (whose key is the numerical id of the display level) defining a given display level using the following keys:

    • machine name: Machine name of the standard.
    • human name: Human friendly name of the standard.
    • module: Machine name of the primary module providing this display level.
    • description: A description of the standard, wrapped in t().
    • id: Numerical id of the display level, this must match the array key.
    • default: A boolean representing whether or not to have this display level enabled by default.

See also

quail_api_get_display_levels()

quail_api_get_display_levels_list()

File

./quail_api.api.php, line 132
Hooks provided by the quail api.

Code

function hook_quail_api_get_display_levels(&$display_levels, $display_level) {
  if (!is_numeric($display_level) || $display_level == 4) {
    $display_levels[4] = array(
      'machine_name' => 'quail_test_other',
      'human_name' => t("Other Problems"),
      'module' => 'wcag7',
      'description' => t("Other problems represent failures in accessibility compliance that do not fall in any of the three primary categories: Major, Minor, and Suggestion."),
      'id' => 4,
      'default' => TRUE,
    );
  }
}