You are here

function crm_core_contact_type_load in CRM Core 7

Loads a contact type.

Parameters

string $type: The machine-readable name of the contact type.

3 calls to crm_core_contact_type_load()
CRMCoreContactTestCase::testCRUD in modules/crm_core_contact/tests/crm_core_contact.test
crm_core_contact_access in modules/crm_core_contact/crm_core_contact.module
Check permission for various contact operations.
crm_core_contact_get_primary_field_name in modules/crm_core_contact/crm_core_contact.module
Get CRM Core Contact primary field name.

File

modules/crm_core_contact/crm_core_contact.module, line 694
Provides default CRM Core Contact entities and the ability to create more.

Code

function crm_core_contact_type_load($type, $reset = FALSE) {
  $results = entity_load('crm_core_contact_type', FALSE, array(
    'type' => $type,
  ), $reset);
  return reset($results);
}