You are here

function redhen_contact_get_types in RedHen CRM 7

Gets an array of all contact types, keyed by the name.

Parameters

string $name: If set, the type with the given name is returned.

7 calls to redhen_contact_get_types()
redhen_contact_entity_info_alter in modules/redhen_contact/redhen_contact.module
Implements hook_entity_info_alter().
redhen_contact_field_extra_fields in modules/redhen_contact/redhen_contact.module
Implements hook_field_extra_fields().
redhen_contact_form_user_register_form_alter in modules/redhen_contact/redhen_contact.module
Implements hook_form_FORM_ID_alter().
redhen_contact_type_load in modules/redhen_contact/redhen_contact.module
Menu argument loader; Load a contact type by string.
redhen_contact_type_options_list in modules/redhen_contact/redhen_contact.module
Return an associative array of contact types to be used as an options list.

... See full list

1 string reference to 'redhen_contact_get_types'
redhen_contact_type_form in modules/redhen_contact/includes/redhen_contact_type.admin.inc
Generates the Redhen Contact type editing form.

File

modules/redhen_contact/redhen_contact.module, line 721
Module file for RedHen contacts.

Code

function redhen_contact_get_types($name = NULL) {
  $types = entity_load_multiple_by_name('redhen_contact_type', isset($name) ? array(
    $name,
  ) : FALSE);
  return isset($name) ? reset($types) : $types;
}