function oa_wizard_entities_page in Open Atrium Wizard 7.2
List all bundles and administrative options for wizards.
1 string reference to 'oa_wizard_entities_page'
- oa_wizard_menu in ./
oa_wizard.module - Implements hook_menu().
File
- ./
oa_wizard.admin.inc, line 10 - Admin form for the Wizards.
Code
function oa_wizard_entities_page() {
$entity_info = entity_get_info('oa_wizard');
$header = array(
t('Name'),
array(
'data' => t('Operations'),
'colspan' => 2,
),
);
$rows = array();
foreach ($entity_info['bundles'] as $bundle => $info) {
$type_url_str = str_replace('_', '-', $bundle);
$row = array();
$label = check_plain($info['label']);
$label .= ' <small>' . t('(Machine name: @type)', array(
'@type' => $bundle,
)) . '</small>';
$row[] = $label;
$operations = array();
$operations['list'] = array(
'title' => t('list'),
'href' => 'admin/structure/wizards/manage/' . $type_url_str,
);
$operations['add'] = array(
'title' => t('add'),
'href' => 'admin/structure/wizards/manage/' . $type_url_str . '/add',
);
$operations['fields'] = array(
'title' => t('manage fields'),
'href' => 'admin/structure/wizards/manage/' . $type_url_str . '/fields',
);
$operations['display'] = array(
'title' => t('manage display'),
'href' => 'admin/structure/wizards/manage/' . $type_url_str . '/display',
);
$ops = theme('links', array(
'links' => $operations,
'attributes' => array(
'class' => array(
'links',
'inline',
),
),
));
$row[] = $ops;
$rows[] = $row;
}
$build['panes_table'] = array(
'#theme' => 'table',
'#header' => $header,
'#rows' => $rows,
);
return $build;
}