You are here

function fc_rebuild in Field Complete 7

1 string reference to 'fc_rebuild'
_fc_menu in ./fc.registry.inc
Implements hook_menu().

File

./fc.admin.inc, line 47
Field Complete - Provides field-based completeness for any entity - admin.

Code

function fc_rebuild($form, &$form_state) {
  $form['msg'] = array(
    '#type' => 'item',
    '#title' => t('Rebuild the Field Complete table'),
    '#description' => t('This action cannot be reversed and should not be interrupted. It may take a long time for big sites.'),
  );
  $entity_types = array();
  foreach (fc_entity_types() as $entity_type => $entity_info) {
    $entity_types[$entity_type] = $entity_info['label'];
  }
  $form['entity_types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Entity types'),
    '#description' => t('Choose which entity types you want to include in the rebuild.'),
    '#options' => $entity_types,
    '#default_value' => array(
      'node' => 'node',
      'user' => 'user',
    ),
    '#required' => TRUE,
  );
  $form['actions'] = array(
    '#type' => 'actions',
    'submit' => array(
      '#type' => 'submit',
      '#value' => t('Rebuild'),
    ),
  );
  return $form;
}