You are here

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

Namesort descending Modifiers Type Description Overrides
CRMCoreContactTypeFeaturesController::revert public function Overridden to prevent data loss on contact type delete. Overrides EntityDefaultFeaturesController::revert
EntityDefaultFeaturesController::$type protected property
EntityDefaultFeaturesController::api public function Defines the result for hook_features_api().
EntityDefaultFeaturesController::export public function Generates the result for hook_features_export().
EntityDefaultFeaturesController::export_options public function Generates the result for hook_features_export_options().
EntityDefaultFeaturesController::export_render public function Generates the result for hook_features_export_render().
EntityDefaultFeaturesController::__construct public function