Hauptnavigation
~~mein~~ MeinRechner ~~D8~~ cinGG Ideen Tools w3schools personen Drupal Linux DB JavaScript css php msc ect html responsive api symfony frameworks quickstart Komponenten HowTo Grafik MediaWiki Software HKF Leitlinien Buecher WW
Pflicht: hook_schema
Kein Erstellen/Entfernen der externen Tabelle (hook_install, hook_uninstall)
function aktionen_install() { // no drupal_install_schema for external table //drupal_install_schema('aktionen'); }
function aktionen_uninstall() { // no drupal_uninstall_schema for external table //drupal_uninstall_schema('aktionen'); }
function aktionen_schema() { $schema = array(); $schema['aktionen'] = array( 'description' => 'Stores action information.', 'fields' => array( 'aid' => array( 'description' => 'Primary Key: Unique actions ID.', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '0', ), 'type' => array( 'description' => 'The object that that action acts on (node, user, comment, system or custom types.)', 'type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => '', ), 'callback' => array( 'description' => 'The callback function that executes when the action runs.', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'parameters' => array( 'description' => 'Parameters to be passed to the callback function.', 'type' => 'blob', 'not null' => TRUE, 'size' => 'big', ), 'label' => array( 'description' => 'Label of the action.', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '0', ), ), 'primary key' => array('aid'), ); return $schema; }