You are here

function crm_core_contact_type_new in CRM Core 7

Return a new contact type with initialize fields.


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

Return value

A stdClass object with contact type fields

2 calls to crm_core_contact_type_new()
CRMCoreContactTestCase::testCRUD in modules/crm_core_contact/tests/crm_core_contact.test
crm_core_contact_install in modules/crm_core_contact/crm_core_contact.install
Implements hook_install().


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


function crm_core_contact_type_new($type = '') {
  $values = array(
    'type' => $type,
    'locked' => 1,
  return entity_create('crm_core_contact_type', $values);