| Versionen | |
|---|---|
| drupal7 | hook_node_insert($node) |
Respond to node insertion.
Take action when a new node of any type is being inserted in the database.
$node The node the action is being performed on.
None.
modules/
<?php
function hook_node_insert($node) {
db_insert('mytable')
->fields(array(
'nid' => $node->nid,
'extra' => $node->extra,
))
->execute();
}
?>
Kommentare
Kommentar hinzufügen