system_modules_confirm_form

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 system_modules_confirm_form($modules, $storage)

Display confirmation form for required modules.

Übergabeparameter

$modules Array of module file objects as returned from module_rebuild_cache().

$storage The contents of $form_state['storage']; an array with two elements: the list of required modules and the list of status form field values from the previous screen.

Verwandte Themen

Code

modules/system/system.admin.inc, line 771

<?php
function system_modules_confirm_form($modules, $storage) {
  $form = array();
  $items = array();

  $form['validation_modules'] = array('#type' => 'value', '#value' => $modules);
  $form['status']['#tree'] = TRUE;

  foreach ($storage['more_modules'] as $info) {
    $t_argument = array(
      '@module' => $info['name'],
      '@required' => implode(', ', $info['requires']),
    );
    $items[] = format_plural(count($info['requires']), 'You must enable the @required module to install @module.', 'You must enable the @required modules to install @module.', $t_argument);
  }
  $form['text'] = array('#markup' => theme('item_list', $items));

  if ($form) {
    // Set some default form values
    $form = confirm_form(
      $form, 
      t('Some required modules must be enabled'), 
      'admin/build/modules', 
      t('Would you like to continue with enabling the above?'), 
      t('Continue'), 
      t('Cancel'));
    return $form;
  }
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen