You are here

function subscriptions_intervals in Subscriptions 7

Same name and namespace in other branches
  1. 5.2 subscriptions.admin.inc \subscriptions_intervals()
  2. 6 subscriptions.admin.inc \subscriptions_intervals()
  3. 2.0.x subscriptions.admin.old.php \subscriptions_intervals()

Provide the form definition for admin/settings/subscriptions/intervals.

Called by _subscriptions_menu() in subscriptions.module.

_state

Parameters

array $form:

Return value

array

See also

_subscriptions_menu()

1 string reference to 'subscriptions_intervals'
subscriptions_menu in ./subscriptions.module
Implements hook_menu().

File

./subscriptions.admin.inc, line 936
Subscriptions module (load-on-demand admin functions).

Code

function subscriptions_intervals(array $form, array &$form_state) {
  $default = '';
  foreach (_subscriptions_send_intervals() as $interval => $text) {
    $default .= "{$interval}|{$text}\n";
  }
  $form['info'] = array(
    '#markup' => t('Define the selection of %Send_interval options available through the user interface. Adding additional ones is easy, but removing one that is already in use is not recommended.', array(
      '%Send_interval' => t('Send interval'),
    )),
  );
  $form['intervals'] = array(
    '#type' => 'textarea',
    '#cols' => 40,
    '#default_value' => $default,
    '#description' => t('Every line has the format of seconds|human readable text'),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}