You are here

public function Notifications_Subscription::element_send_interval in Notifications 7

Form element: send interval

2 calls to Notifications_Subscription::element_send_interval()
Notifications_Subscription::form_edit in ./notifications.subscription.inc
Get edit form for this subscription
Notifications_Subscription::form_view in ./notifications.subscription.inc
Get view only form for this subscription

File

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

Class

Notifications_Subscription
Common base for subscription type and subscription instance

Code

public function element_send_interval($element = array()) {

  // For scheduled notifications we don't give any option
  if (isset($this->send_interval) && $this->send_interval == self::SEND_SCHEDULED) {
    return $element;
  }
  $send_intervals = notifications_send_intervals($this
    ->get_user());
  if (count($send_intervals) > 1) {
    $element += array(
      '#title' => t('Send interval'),
      '#type' => 'select',
      '#options' => $send_intervals,
      '#default_value' => $this->send_interval,
    );
  }
  return $element;
}