_drupal_initialize_schema

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 _drupal_initialize_schema($module, &$schema)

Fill in required default values for table definitions returned by hook_schema().

Übergabeparameter

$module The module for which hook_schema() was invoked.

$schema The schema definition array as it was returned by the module's hook_schema().

Verwandte Themen

▾ 3 functions call _drupal_initialize_schema()

drupal_get_schema in includes/bootstrap.inc
Get the schema definition of a table, or the whole database schema.
drupal_install_schema in includes/common.inc
Create all tables that a module defines in its hook_schema().
drupal_uninstall_schema in includes/common.inc
Remove all tables that a module defines in its hook_schema().

Code

includes/common.inc, line 4128

<?php
function _drupal_initialize_schema($module, &$schema) {
  // Set the name and module key for all tables.
  foreach ($schema as $name => $table) {
    if (empty($table['module'])) {
      $schema[$name]['module'] = $module;
    }
    if (!isset($table['name'])) {
      $schema[$name]['name'] = $name;
    }
  }
}
?>

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