You are here

function notifications_custom_list in Notifications 6.4

Same name and namespace in other branches
  1. 6 notifications_custom/notifications_custom.module \notifications_custom_list()

Get all custom subscriptions by type

4 calls to notifications_custom_list()
notifications_custom_admin_page in notifications_custom/notifications_custom.admin.inc
Page callback, administer custom subscriptions
notifications_custom_build_list in notifications_custom/notifications_custom.module
Retrieve list of custom subscription types true objects
notifications_custom_notifications in notifications_custom/notifications_custom.module
Implementation of hook_notifications().
notifications_custom_user_operations in notifications_custom/notifications_custom.module
Implementation of hook_user_operations().

File

notifications_custom/notifications_custom.module, line 276
Custom notifications module

Code

function notifications_custom_list() {
  $cache =& messaging_static(__FUNCTION__);
  if (!isset($cache)) {
    $cache = array();
    $result = db_query("SELECT * FROM {notifications_custom} ORDER BY weight");
    while ($custom = db_fetch_object($result)) {
      $custom->fields = !empty($custom->fields) ? unserialize($custom->fields) : array();
      $cache[$custom->type] = $custom;
    }
  }
  return $cache;
}