function spaces_context_reactions in Spaces 6
Implementation of hook_context_reactions().
File
- ./
spaces.module, line 324
Code
function spaces_context_reactions() {
$type_options = array();
foreach (spaces_types() as $type => $info) {
$type_options[$type] = $info['title'];
}
$items = array();
$items['spaces'] = array(
'#title' => t('Spaces feature'),
'#tree' => 'true',
'label' => array(
'#title' => t('Label'),
'#description' => t('The name of your feature.'),
'#type' => 'textfield',
),
'description' => array(
'#title' => t('Description'),
'#description' => t('A short description to display with your feature.'),
'#type' => 'textfield',
),
// Support only 1 menu item currently
'menu' => array(
'#tree' => TRUE,
0 => array(
'#tree' => TRUE,
'title' => array(
'#title' => t('Menu link'),
'#description' => t('The link text for your feature.'),
'#type' => 'textfield',
),
'href' => array(
'#title' => t('Menu path'),
'#description' => t('The path to your feature. <strong>Example:</strong> blog'),
'#type' => 'textfield',
),
),
),
'types' => array(
'#title' => t('Enabled types'),
'#description' => t('Choose the space types for which this feature can be enabled. Leave empty to allow this feature to be used with any space type.'),
'#type' => 'checkboxes',
'#options' => $type_options,
'#multiple' => TRUE,
),
);
return $items;
}