You are here

protected function Notifications_Subscription::get_link_type in Notifications 7

Get default link type (susbscribe || unsubscribe)

'subscription' type will translate on subscribe/unsubscribe depending on current status

Parameters

$type: Link type.

1 call to Notifications_Subscription::get_link_type()
Notifications_Subscription::element_link in ./notifications.subscription.inc
Get link element

File

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

Class

Notifications_Subscription
Common base for subscription type and subscription instance

Code

protected function get_link_type($type = NULL) {
  if (!$type || $type == 'subscription') {
    return $this
      ->is_stored() ? 'unsubscribe' : 'subscribe';
  }
  else {
    return $type;
  }
}