You are here

function drd_server_drd_config_domain in Drupal Remote Dashboard Server 7.2

Same name and namespace in other branches
  1. 6.2 drd_server.module \drd_server_drd_config_domain()

Implements hook_drd_config_domain().

Return value

array Form definition for domain settings.

File

./drd_server.module, line 379
Provides XMLRPC implementation to respond to requests from DRD.

Code

function drd_server_drd_config_domain() {
  $form = array();
  if (!module_exists('block')) {
    $form['drd_server_blocks'] = array(
      '#type' => 'checkboxes',
      '#options' => array(),
      '#disabled' => TRUE,
      '#title' => t('Blocks to display (unavailable)'),
      '#description' => t('Block module disabled on the remote server.'),
    );
    return $form;
  }
  $block_list = array();
  foreach (module_implements('block_info') as $module) {
    foreach (module_invoke($module, 'block_info') as $key => $block) {
      $block_list[$module . ':' . $key] = $block['info'];
    }
  }
  $form['drd_server_blocks'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Blocks to display'),
    '#options' => $block_list,
    '#default_value' => variable_get('drd_server_blocks', array()),
  );
  return $form;
}