class CRMCoreContactTypeFeaturesController in CRM Core 7
CRMCoreContactTypeFeaturesController class.
Hierarchy
Expanded class hierarchy of CRMCoreContactTypeFeaturesController
1 string reference to 'CRMCoreContactTypeFeaturesController'
- crm_core_contact_entity_info in modules/
crm_core_contact/ crm_core_contact.module - Implements hook_entity_info().
File
- modules/
crm_core_contact/ includes/ crm_core_contact_type.controller.inc, line 54 - Controller class for contacts.
View source
class CRMCoreContactTypeFeaturesController extends EntityDefaultFeaturesController {
/**
* Overridden to prevent data loss on contact type delete.
*/
public function revert($module = NULL) {
if ($defaults = features_get_default($this->type, $module)) {
foreach ($defaults as $name => $contact_type) {
db_delete('crm_core_contact_type')
->condition('type', $name)
->execute();
crm_core_contact_type_save($contact_type);
}
}
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CRMCoreContactTypeFeaturesController:: |
public | function |
Overridden to prevent data loss on contact type delete. Overrides EntityDefaultFeaturesController:: |
|
EntityDefaultFeaturesController:: |
protected | property | ||
EntityDefaultFeaturesController:: |
public | function | Defines the result for hook_features_api(). | |
EntityDefaultFeaturesController:: |
public | function | Generates the result for hook_features_export(). | |
EntityDefaultFeaturesController:: |
public | function | Generates the result for hook_features_export_options(). | |
EntityDefaultFeaturesController:: |
public | function | Generates the result for hook_features_export_render(). | |
EntityDefaultFeaturesController:: |
public | function |