You are here

function crm_core_contact_type_save in CRM Core 7

Saves a contact type.

Parameters

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/crm_core_contact_type.controller.inc
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/crm_core_contact.admin.inc
Form submit handler: save a contact type.
crm_core_contact_ui_type_toggle_form_submit in modules/crm_core_contact_ui/crm_core_contact_ui.admin.inc
Form submit handler: enable or disable a contact type

File

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

Code

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