You are here

function privatemsg_recipient_get_types in Privatemsg 7

Same name and namespace in other branches
  1. 6.2 privatemsg.module \privatemsg_recipient_get_types()
  2. 7.2 privatemsg.module \privatemsg_recipient_get_types()

Returns an array of defined recipient types.

Return value

Array of recipient types

See also

hook_privatemsg_recipient_type_info()

Related topics

4 calls to privatemsg_recipient_get_types()
privatemsg_autocomplete in ./privatemsg.pages.inc
Return autocomplete results for usernames.
privatemsg_cron in ./privatemsg.module
Implements hook_cron().
privatemsg_new in ./privatemsg.pages.inc
privatemsg_recipient_get_type in ./privatemsg.module
Return a single recipient type information.

File

./privatemsg.module, line 2483
Allows users to send private messages to other users.

Code

function privatemsg_recipient_get_types() {
  $types =& drupal_static(__FUNCTION__, NULL);
  if ($types === NULL) {
    $types = module_invoke_all('privatemsg_recipient_type_info');
    if (!is_array($types)) {
      $types = array();
    }
    drupal_alter('privatemsg_recipient_type_info', $types);
    uasort($types, 'element_sort');
  }
  return $types;
}