You are here

function video_filesystem_admin_settings in Video 6.5

Same name and namespace in other branches
  1. 6.4 video.admin.inc \video_filesystem_admin_settings()

File system admin settings

1 string reference to 'video_filesystem_admin_settings'
video_menu in ./video.module
Implementation of hook_menu().

File

./video.admin.inc, line 456

Code

function video_filesystem_admin_settings($form_state) {
  $form = array();
  $filesystemplugins = video_get_filesystem_plugins();
  ksort($filesystemplugins);
  $filesystems = array();
  $help = array();
  foreach ($filesystemplugins as $filesystemplugin) {
    $filesystem = video_get_filesystem($filesystemplugin['name']);
    $filesystems[$filesystemplugin['name']] = $filesystem
      ->get_name();
    $help[] = $filesystem
      ->get_help();
    $form['video_' . $filesystemplugin['name'] . '_start'] = array(
      '#type' => 'markup',
      '#value' => '<div id="' . $filesystemplugin['name'] . '">',
    );
    $form = array_merge($form, $filesystem
      ->admin_settings($form_state));
    $form['video_' . $filesystemplugin['name'] . '_end'] = array(
      '#type' => 'markup',
      '#value' => '</div>',
    );
  }
  $form['vid_filesystem'] = array(
    '#type' => 'radios',
    '#title' => t('Video file system'),
    '#default_value' => variable_get('vid_filesystem', 'drupal'),
    '#options' => $filesystems,
    '#description' => theme('item_list', $help),
    '#prefix' => '<div id="filesystem-radios">',
    '#suffix' => '</div>',
    '#weight' => -1,
  );
  return system_settings_form($form);
}