You are here

function theme_backup_migrate_dependent in Backup and Migrate 7.3

Same name and namespace in other branches
  1. 8.3 backup_migrate.module \theme_backup_migrate_dependent()
  2. 6.3 backup_migrate.module \theme_backup_migrate_dependent()

Theme the dependent form section.

1 theme call to theme_backup_migrate_dependent()
backup_migrate_element_info in ./backup_migrate.module
Implements hook_element_info().

File

./backup_migrate.module, line 1016
Backup and restore databases for Drupal.

Code

function theme_backup_migrate_dependent($vars) {
  $element = $vars['element'];
  drupal_add_js(drupal_get_path('module', 'backup_migrate') . '/backup_migrate.js');
  drupal_add_css(drupal_get_path('module', 'backup_migrate') . '/backup_migrate.css');
  $id = drupal_html_id(implode('-', $element['#array_parents']));
  $settings = array(
    'backup_migrate' => array(
      'dependents' => array(
        $id => array(
          'dependent' => $id,
          'dependencies' => $element['#dependencies'],
        ),
      ),
    ),
  );
  drupal_add_js($settings, 'setting');
  return '<div id="edit-' . $id . '" class="backup-migrate-form-dependent">' . drupal_render_children($element) . '</div>';
}