You are here

function sheetnode_phpexcel_link in Sheetnode 5

Same name and namespace in other branches
  1. 6 modules/sheetnode_phpexcel/sheetnode_phpexcel.module \sheetnode_phpexcel_link()

Implementation of hook_link().

File

modules/sheetnode_phpexcel/sheetnode_phpexcel.module, line 71

Code

function sheetnode_phpexcel_link($type, $node = NULL, $teaser = FALSE) {
  if ($type != 'node' || $node->type != 'sheetnode') {
    return array();
  }
  foreach (sheetnode_phpexcel_get_plugins('output') as $format => $plugin) {
    $links[$format] = array(
      'title' => t('Save as !format', array(
        '!format' => $plugin['short-name'],
      )),
      'href' => "sheetnode/{$format}/{$node->nid}",
    );
  }
  return $links;
}