function libraries_admin_status_table in Libraries API 7.2
Displays a table of status information about a library.
Parameters
array $library: A library information array.
Return value
array A renderable array containing a table with status information.
1 call to libraries_admin_status_table()
- libraries_admin_library_status_form in ./
libraries.admin.inc - Form generation callback for the status overview for a single library.
File
- ./
libraries.admin.inc, line 195 - Provides administrative page and form callbacks for Libraries module.
Code
function libraries_admin_status_table(array $library) {
$header = array(
array(
// @todo The title implies that other type of information is displayed, as
// well, but this is currently not the case.
// @todo Use CSS instead of a <strong> element.
'data' => '<strong>' . t('General information') . '</strong>',
'colspan' => 2,
'class' => 'table-heading',
'no_striping' => TRUE,
),
);
$rows = array();
// @todo Use CSS instead of <strong> elements.
$rows['name'] = array(
'<strong>' . t('Name') . '</strong>',
check_plain($library['name']),
);
$rows['machine_name'] = array(
'<strong>' . t('Machine name') . '</strong>',
check_plain($library['machine name']),
);
if ($library['vendor url']) {
$rows['vendor_url'] = array(
'<strong>' . t('Vendor URL') . '</strong>',
l($library['vendor url'], $library['vendor url']),
);
}
if ($library['download url']) {
$rows['download_url'] = array(
'<strong>' . t('Download URL') . '</strong>',
l($library['download url'], $library['download url']),
);
}
$rows['provider'] = array(
'<strong>' . t('Provider') . '</strong>',
libraries_admin_get_provider_with_type($library),
);
$rows['library_path'] = array(
'<strong>' . t('Library path') . '</strong>',
$library['library path'],
);
$rows['version'] = array(
'<strong>' . t('Version') . '</strong>',
$library['version'],
);
if (!empty($library['variants'])) {
$rows['variants'] = array(
'<strong>' . t('Variants') . '</strong>',
implode(', ', array_keys($library['variants'])),
);
}
return array(
'#theme' => 'table',
'#header' => $header,
'#rows' => $rows,
);
}