function node_registration_field_extra_fields in Node registration 7
Implements hook_field_extra_fields().
File
- ./
node_registration.module, line 20
Code
function node_registration_field_extra_fields() {
$fields = array();
foreach (_node_registration_bundles() as $type => $name) {
// Registration: e-mail.
_node_registration_extra_field($fields, $type, 'email', t('E-mail address'), t('Your e-mail address.'));
// Registration: account.
_node_registration_extra_field($fields, $type, 'account', t('Account'), t('Some users get to see a user autocomplete.'));
// Registration: slots.
_node_registration_extra_field($fields, $type, 'slots', t('Slots'), t('The number of slots dropdown.'));
// Registration: attended.
_node_registration_extra_field($fields, $type, 'attended', t('Attended'), t('Whether the registree attended.'));
// Registration: author.
$fields['node_registration'][$type]['display']['author'] = array(
'label' => t('Author'),
'description' => t('The author of this registration.'),
'weight' => 0,
);
// Registration: event_node.
$fields['node_registration'][$type]['display']['event_node'] = array(
'label' => t('Link to event node'),
'description' => t('Name of and link to the event node.'),
'weight' => 0,
);
// Registration: event_node_content.
$fields['node_registration'][$type]['display']['event_node_content'] = array(
'label' => t('Rendered event node'),
'description' => t('Rendered event node.'),
'weight' => 0,
);
// Registration: cancel_link.
$fields['node_registration'][$type]['display']['cancel_link'] = array(
'label' => t('Cancel link'),
'description' => t('Link to cancel page/form IF you have access.'),
'weight' => 0,
);
// Node: registration link.
$fields['node'][$type]['display']['registration_link'] = array(
'label' => t('Registration link'),
'description' => t('A link to the registration page.'),
'weight' => 1,
);
// Node: registration form.
$fields['node'][$type]['display']['registration_form'] = array(
'label' => t('Registration form'),
'description' => t('The full registration form.'),
'weight' => 1,
);
// Node: slots left.
$fields['node'][$type]['display']['registration_slots_left'] = array(
'label' => t('Open slots'),
'description' => t('The number of registrable slots left.'),
'weight' => 1,
);
// Node: reason for unregistrable.
$fields['node'][$type]['display']['registration_unregistrable_reason'] = array(
'label' => t('Reason for unregistrable (requires devel or ?debug)'),
'description' => t("The reason you don't see a register form/tab. For debugging!"),
'weight' => 1,
);
}
return $fields;
}