You are here

function sheetnode_view in Sheetnode 7.2

Same name and namespace in other branches
  1. 5 sheetnode.module \sheetnode_view()
  2. 6 sheetnode.module \sheetnode_view()
  3. 7 sheetnode.module \sheetnode_view()

Implements hook_view().

2 string references to 'sheetnode_view'
sheetnode_handler_field_editable::views_form_submit in views/sheetnode_handler_field_editable.inc
Submit views form for handler.
sheetnode_update_7003 in ./sheetnode.install
Implements hook_update_N().

File

./sheetnode.module, line 107
Module file for the sheetnode module.

Code

function sheetnode_view($node, $view_mode) {

  // SocialCalc sheet.
  if ($view_mode == 'full') {
    $output = _sheetnode_inject(drupal_clean_css_identifier('sheetnode-' . $node->nid), 'sheetnode', $node->sheetnode['value'], FALSE, array(
      'entity-type' => 'node',
      'oid' => $node->nid,
    ));
    $node->content['sheetnode'] = array(
      '#markup' => $output,
      '#weight' => -1,
    );
  }
  return $node;
}