Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $actions = array(
- 'cron' => array(
- 'title' => t('Index @count queued items', array('@count' => $status['remaining'])),
- 'description' => t('Indexes as much as one cron invocation'),
- 'disabled' => TRUE,
- ),
- 'remaining' => array(
- 'title' => t('Index all queued content'),
- 'description' => t('Starts a batch job which could take a long time and could put an increased load on your server.'),
- 'disabled' => TRUE,
- ),
- 'reindex' => array(
- 'title' => t('Queue all content for reindexing'),
- 'disabled' => FALSE,
- ),
- 'delete' => array(
- 'title' => t('Delete the Solr index'),
- 'description' => t('Useful with a corrupt index or a new schema.xml.'),
- 'disabled' => FALSE,
- ),
- );
- foreach ($actions as $key => $action) {
- // Generate the parents as the autogenerator does, so we will have a
- // unique id for each radio button.
- $form['action'][$key] = array(
- '#type' => 'radio',
- '#title' => check_plain($action['title']),
- //'#default_value' => 'cron',
- '#return_value' => $key,
- '#parents' => array('action'),
- '#description' => (!empty($action['description'])) ? check_plain($action['description']) : '',
- '#id' => drupal_clean_css_identifier('edit-' . implode('-', array('action', $key))),
- '#disabled' => isset($action['disabled']) ? $action['disabled'] : FALSE,
- );
- }
Add Comment
Please, Sign In to add comment