function hierarchical_select_admin_configs in Hierarchical Select 5.3
Same name and namespace in other branches
- 6.3 hierarchical_select.admin.inc \hierarchical_select_admin_configs()
- 7.3 hierarchical_select.admin.inc \hierarchical_select_admin_configs()
Menu callback; a table that lists all Hierarchical Select configs.
1 string reference to 'hierarchical_select_admin_configs'
- hierarchical_select_menu in ./
hierarchical_select.module - Implementation of hook_menu().
File
- ./
hierarchical_select.admin.inc, line 72 - Module settings and configuration administration UI.
Code
function hierarchical_select_admin_configs() {
$header = array(
t('Hierarchy type'),
t('Hierarchy'),
t('Entity type'),
t('Entity'),
t('Context type'),
t('Context'),
t('Actions'),
);
// Retrieve all information items
$info_items = array();
foreach (module_implements('hierarchical_select_config_info') as $module) {
$info_items = array_merge_recursive($info_items, module_invoke($module, 'hierarchical_select_config_info'));
}
// Process the retrieved information into rows.
$rows = array();
foreach ($info_items as $id => $item) {
$config_id = $item['config_id'];
$rows[$id] = array(
$item['hierarchy type'],
check_plain($item['hierarchy']),
$item['entity type'],
$item['entity'],
$item['context type'],
$item['context'],
theme('links', array(
array(
'title' => t('Edit'),
'href' => $item['edit link'],
'fragment' => "hierarchical-select-config-form-{$config_id}",
),
array(
'title' => t('Export'),
'href' => "admin/settings/hierarchical_select/export/{$config_id}",
),
array(
'title' => t('Import'),
'href' => "admin/settings/hierarchical_select/import/{$config_id}",
),
)),
);
}
return theme('table', $header, $rows, array(), t('Overview of all Hierarchical Select configurations.'));
}