You are here

function nodereferrer_widget in NodeReferrer 5

Implementation of hook_widget().

File

./nodereferrer.module, line 227
Defines a field type for backlinking referencing nodes. @todo -clear content cache with nodeapi. -query nids for access on load/view..

Code

function nodereferrer_widget($op, &$node, $field, &$node_field) {

  // for some reason widgets must implement a form for them to work...
  // I'm not sure that this is ideal for a set and forget service
  // automated field, something in CCK in content_admin.inc:content_admin_field_overview_form
  // need to be re-thunk I think.
  // token module tries to use the form input.. grr... so lets structure it like
  // an item...
  switch ($op) {
    case 'form':
      $form[$field['field_name']] = array(
        '#tree' => TRUE,
        '0' => array(),
      );
      return $form;
  }

  // I do nothing. I'm a read only thing... not too into the widgets.
}