You are here

function crm_core_contact_type_save in CRM Core 7

Saves a contact type.


object $contact_type: Contact object.

Return value

bool FALSE if the insert fails and SAVED_NEW or SAVED_UPDATED based on the operation performed, exception in case of error.

5 calls to crm_core_contact_type_save()
CRMCoreContactTestCase::testCRUD in modules/crm_core_contact/tests/crm_core_contact.test
CRMCoreContactTypeFeaturesController::revert in modules/crm_core_contact/includes/
Overridden to prevent data loss on contact type delete.
crm_core_contact_install in modules/crm_core_contact/crm_core_contact.install
Implements hook_install().
crm_core_contact_type_form_submit in modules/crm_core_contact/
Form submit handler: save a contact type.
crm_core_contact_ui_type_toggle_form_submit in modules/crm_core_contact_ui/
Form submit handler: enable or disable a contact type


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


function crm_core_contact_type_save($contact_type) {
  return entity_save('crm_core_contact_type', $contact_type);