You are here

function hook_node_import_postprocess in Node import 5

Same name and namespace in other branches
  1. 6 node_import.api.php \hook_node_import_postprocess()

Allows a module to react on the creation of a node by node_import.

After the node has been created or an attempt to create it has failed node_import fires this hook so other modules can react on it.

This function can also be used to alter the node before preview. Eg for an image related module to insert a preview of the to-be-imported image.

Parameters

$node: A node object that was processed.

$preview: Boolean. If TRUE this function is only run in a preview stage. The function should then avoid making permanent changes to any database table. If FALSE the function may commit permanent changes to the database that are needed to import the node.

$error: Boolean. If TRUE then the node was not imported successfully. If FALSE the node was imported successfully.

Return value

Nothing.

2 functions implement hook_node_import_postprocess()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

image_node_import_postprocess in supported/image.inc
Implementation of hook_node_import_postprocess().
upload_node_import_postprocess in supported/upload.inc
Implementation of hook_node_import_postprocess().
1 invocation of hook_node_import_postprocess()
_node_import_get_nodes in ./node_import.module
Import and create nodes.

File

docs/node_import_hook_docs.php, line 124
Documentation for hooks provided by the node_import module.

Code

function hook_node_import_postprocess(&$node, $preview, $error) {

  // The story doesn't need any postprocessing. This hook is not used for
  // actually importing the node (as are the other hooks), but rather to
  // inform a third-party module of the fact that the node was imported.
  return;
}