1.20.x bootstrap.inc | silkscreen_driver_list() |
Returns a list of objects decribing the installed drivers indexed by their machine names. Each of the driver objects includes the path to their info file, their machine name, and the contents of their info files.
Return value
array: A list of objects describing the installed drivers.
File
- includes/
bootstrap.inc, line 1511 - Functions that need to be loaded on every Backdrop request.
Code
function silkscreen_driver_list() {
static $info_files = array();
if (empty($info_files)) {
$config = conf_path();
$searchdir = array(
'core/drivers',
'drivers',
$config . '/drivers',
);
$info_files = backdrop_scan_directories("/\.info$/", $searchdir);
foreach ($info_files as $driver_name => $driver_info) {
$info_files[$driver_name]->info = backdrop_parse_info_file(BACKDROP_ROOT . '/' . $driver_info->uri);
}
}
return $info_files;
}