function recommender_overview in Recommender API 7.6
1 string reference to 'recommender_overview'
- recommender_menu in ./
recommender.module - Implements hook_menu().
File
- ./
recommender.module, line 49
Code
function recommender_overview($form, &$form_state) {
$form['info'] = array(
'#markup' => '<p>' . t("After you configure any settings of Recommender API modules, please go to !link to submit a Recommender command. And then use either 'drush recommender-run' or the Java agent to compute recommendations offline.", array(
'!link' => l('Command', COMPUTING_MODULE_ADMIN_PATH . '/list'),
)) . '</p>',
);
$form['recommender_cron_strategy'] = array(
'#type' => 'radios',
'#title' => t('How to run cron tasks?'),
'#options' => array(
'drupal' => t('Together with Drupal Cron'),
'drush' => t('Separately with Drush'),
),
'#default_value' => variable_get('recommender_cron_strategy', 'drupal'),
);
$form['recommender_cron_strategy']['drupal']['#description'] = t('Run recommender cron tasks whenever Drupal Cron runs.');
$form['recommender_cron_strategy']['drush']['#description'] = t('Setup to run "drush recommender-cron" separately instead of running recommender cron with Drupal Cron.');
$form['warning'] = array(
'#markup' => '<p><em>' . t("WARNING: Do not use the 'Run Recommender' button below unless your dataset is small (such as the dataset in Recommender Example). Otherwise you might see PHP 'Out of Memory' error or 'Timeout' error.") . '</em></p>',
);
// append to 'actions' for system_settings_form().
$form['actions'] = array(
'run' => array(
'#type' => 'submit',
'#name' => 'run',
'#value' => t('Run Recommender'),
),
);
$form['#submit'][] = 'recommender_overview_submit';
return system_settings_form($form);
}