You are here

private function video_filesystem::_filesystem in Video 6.4

1 call to video_filesystem::_filesystem()
video_filesystem::admin_settings in includes/filesystem.inc

File

includes/filesystem.inc, line 65

Class

video_filesystem

Code

private function _filesystem() {
  $files = array();

  // Lets find our transcoder classes and build our radio options
  // We do this by scanning our transcoders folder
  $form = array(
    'radios' => array(),
    'help' => array(),
    'admin_settings' => array(),
  );
  $path = drupal_get_path('module', 'video') . '/filesystem';
  $files = file_scan_directory($path, '^.*\\.inc$');

  // check inside sub modules
  $modules = module_list();
  foreach ($modules as $module) {
    $mobule_files = array();
    $module_path = drupal_get_path('module', $module) . '/filesystem';
    $mobule_files = file_scan_directory($module_path, '^.*\\.inc$');
    $files = array_merge($files, $mobule_files);
  }
  foreach ($files as $file) {
    if (!module_load_include('inc', 'video', '/filesystem/' . $file->name)) {
      require_once $file->filename;
    }
    $focus = new $file->name();
    $form['radios'][$focus
      ->get_value()] = $focus
      ->get_name();
    $form['help'][] = $focus
      ->get_help();

    // creating div for each option
    $form['video_' . $focus
      ->get_value() . '_start'] = array(
      'video_' . $focus
        ->get_value() . '_start' => array(
        '#type' => 'markup',
        '#value' => '<div id="' . $focus
          ->get_value() . '">',
      ),
    );
    $form['video_' . $focus
      ->get_value() . '_end'] = array(
      'video_' . $focus
        ->get_value() . '_end' => array(
        '#type' => 'markup',
        '#value' => '</div>',
      ),
    );
    $form['admin_settings'] = $form['admin_settings'] + $form['video_' . $focus
      ->get_value() . '_start'] + $focus
      ->admin_settings() + $form['video_' . $focus
      ->get_value() . '_end'];
  }
  return $form;
}