You are here

function notifications_build_method in Notifications 7

Same name and namespace in other branches
  1. 6.4 notifications.module \notifications_build_method()
  2. 6.3 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

2 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

File

./notifications.module, line 1064
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'];
  }
}