You are here

function notifications_build_method in Notifications 6.4

Same name and namespace in other branches
  1. 6.3 notifications.module \notifications_build_method()
  2. 7 notifications.module \notifications_build_method()

Information about digesting method for a send interval.

Return value

array() Ditest information for that interval, or all the information if no interval

4 calls to notifications_build_method()
NotificationsLiteTests::testNotificationsLite in tests/notifications_lite.test
Test simple sending cases
NotificationsTemplatesTests::testNotificationsTemplates in tests/notifications_templates.test
Play with creating, retrieving, deleting a pair subscriptions
Notifications_Queue::build_method in includes/notifications_queue.class.inc
Information about digesting method for composing a message
notifications_send_intervals_form in ./notifications.admin.inc
Send intervals administration

File

./notifications.module, line 1389
Notifications module

Code

function notifications_build_method($send_interval = NULL, $refresh = FALSE) {
  $build_methods = notifications_info('build methods', NULL, $refresh);
  $intervals = variable_get('notifications_digest_methods', array());
  if (is_null($send_interval)) {
    return $build_methods;
  }
  elseif (!empty($intervals[$send_interval]) && isset($build_methods[$intervals[$send_interval]])) {
    return $build_methods[$intervals[$send_interval]];
  }
  else {

    // Default, that will be always the simple one
    return $build_methods['simple'];
  }
}