function subscriptions_intervals in Subscriptions 2.0.x
Same name and namespace in other branches
- 5.2 subscriptions.admin.inc \subscriptions_intervals()
- 6 subscriptions.admin.inc \subscriptions_intervals()
- 7 subscriptions.admin.inc \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()
2 string references to 'subscriptions_intervals'
- IntervalsForm::getFormId in src/
Form/ IntervalsForm.php - Returns a unique string identifying the form.
- subscriptions_menu in ./
subscriptions.module.old.php - Implements hook_menu().
File
- ./
subscriptions.admin.old.php, 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;
}