You are here

function webform_link in Webform 5

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

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

File

./webform.module, line 293

Code

function webform_link($type, $node = 0, $main = 0) {
  if ($node->type == 'webform') {
    if ($main == 1) {
      $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;
}