You are here

function webform_link in Webform 6.2

Same name and namespace in other branches
  1. 5.2 webform.module \webform_link()
  2. 5 webform.module \webform_link()
  3. 6.3 webform.module \webform_link()

Implementation of hook_link(). Always add a "view form" link.

File

./webform.module, line 598

Code

function webform_link($type, $node = NULL, $teaser = FALSE) {
  $links = array();
  if (isset($node->type) && $node->type === 'webform') {
    if ($teaser && !$node->webform['teaser']) {
      $links['webform_goto'] = array(
        'title' => t('Go to form'),
        'href' => 'node/' . $node->nid,
        'attributes' => array(
          'title' => t('View this form.'),
          'class' => 'read-more',
        ),
      );
    }
  }
  return $links;
}