Example pipes implementation

  1. function hook_pipes_steps() {
  2.   $items = array();
  3.   // The keys of the array are the function names.
  4.   $items['node_add'] = array(
  5.     // Use 'title' for the title that will be shown to the user.
  6.     'title' => t('A node add form'),
  7.     // The input that this takes. The special type 'null' indicates that an input is not required.
  8.     'input' => array(
  9.       // Stuff within master array is AND-ed. Stuff within slave arrays are OR-ed.
  10.       array('node', 'node type', 'string', 'null'),
  11.     ),
  12.     'defaults' => array(
  13.       // Defaults to use in the case that no data is passed. Optional key. Numeric values are passed through arg().
  14.       1,
  15.     ),
  16.     // What type of data does this function output?
  17.     'output' => 'form',
  18.     // Altering the data on certain values.
  19.     'decision' => array(
  20.     // If it is_null. Values ending in () are treated as functions. Everything else is just returned/used.
  21.     'is_null' => 'drupal_handle_null_node_request()',
  22.     ),
  23.   );
  24.   return $items;
  25. }