function invite_admin_add_page in Invite 7.4
Page to select invite Type to add new invite.
Return value
array Renderable array
1 string reference to 'invite_admin_add_page'
- invite_menu in ./
invite.module - Implements hook_menu().
File
- includes/
invite.admin.inc, line 128
Code
function invite_admin_add_page() {
$items = array();
foreach (invite_get_types() as $invite_type_key => $invite_type) {
$items[] = l(entity_label('invite_type', $invite_type), 'invite/add/' . $invite_type_key);
}
if (sizeof($items) < 1) {
$form_element = array(
'list' => array(
'#markup' => '<h3>No invite types have been enabled.</h3><br /><p>To create invites at least one invite type must be enabled.</p>',
),
);
}
else {
$form_element = array(
'list' => array(
'#theme' => 'item_list',
'#items' => $items,
'#title' => t('Select type of invite to create.'),
),
);
}
return $form_element;
}