You are here

public function Notifications_Subscription::element_link in Notifications 7

Get link element

1 call to Notifications_Subscription::element_link()
Notifications_Subscription::get_link in ./notifications.subscription.inc
Subscribe links are ok for instances and types

File

./notifications.subscription.inc, line 300
Drupal Notifications Framework - Default class file

Class

Notifications_Subscription
Common base for subscription type and subscription instance

Code

public function element_link($operation = NULL, $options = array()) {
  $type = $this
    ->get_link_type($operation);
  $options += $this
    ->get_link_options($type, $options);
  $path = $this
    ->get_path($type, $options);
  return array(
    '#type' => 'link',
    '#title' => $this
      ->get_link_text($type),
    '#href' => $path,
    '#options' => notifications_url_options($path, $options) + array(
      'html' => TRUE,
    ),
    '#description' => $this
      ->get_description(),
  );
}