You are here

function Notifications_Field::get_link in Notifications 7

Get link if this field is linked to an object

2 calls to Notifications_Field::get_link()
Notifications_Field::element_info in ./notifications.field.inc
Build a form element to display this field
Notifications_Field::format_value in ./notifications.field.inc
Format value

File

./notifications.field.inc, line 100
Drupal Notifications Framework - Default class file

Class

Notifications_Field
Base class for Notifications fields

Code

function get_link($options = array()) {
  if (($path = $this
    ->get_path()) && ($name = $this
    ->get_name())) {
    return l($name, $path, $options);
  }
  else {

    // Fallback if we have no link, will be plaintext name
    return check_plain($this
      ->get_name());
  }
}