public static function QuailApiSettings::get_severity_list in Quail API 8
Returns a list of display levels that are supported.
This is only a list of the machine_name and human_name of the select lists. Use this for populating select lists, radio buttons, and check boxes.
Parameters
array|null $severitys: (optional) Providing a valid array of display lists as returned by QuailApiSettings::get_severity() and it will be properly converted into a display levels list.
Return value
array An array of display levels that are supported by this module or extending modules. The array keys are the display levels machine name and the array value is the human name.
See also
QuailApiSettings::get_severity()
File
- src/
QuailApiSettings.php, line 320
Class
- QuailApiSettings
- Class QuailApiSettings.
Namespace
Drupal\quail_apiCode
public static function get_severity_list($severitys = NULL) {
if (is_null($severitys)) {
$severitys = QuailApiSettings::get_severity();
}
$severitys_list = [];
foreach ($severitys as $machine_name => $value) {
if (isset($value['human_name'])) {
$severitys_list[$machine_name] = $value['human_name'];
}
}
return $severitys_list;
}