You are here

function certificate_node_view in Certificate 4.x

Same name and namespace in other branches
  1. 8.3 certificate.module \certificate_node_view()
  2. 7.3 certificate.module \certificate_node_view()
  3. 7.2 certificate.module \certificate_node_view()
  4. 3.x certificate.module \certificate_node_view()

Deprecated

maybe Implements hook_node_view().

File

./certificate.module, line 14

Code

function certificate_node_view($node, $view_mode, $langcode) {
  return 'FIXME';
  if (certificate_can_access_certificate($node['#node'])) {

    // Add a download certificate link to the node content.
    $url = Url::fromRoute('certificate.course');
    $internal_link = Link::fromTextAndUrl(t('Download certificate'), $url);
    $node->content['certificate']['#markup'] = '<span class="certificate-link">' . $internal_link . '</span>';
  }
}