You are here

function entity_features_get_controller in Entity API 7

Returns the configured entity features controller.

Parameters

string $type: The entity type to get the controller for.

Return value

EntityDefaultFeaturesController The configured entity features controller.

1 call to entity_features_get_controller()
entity_features_api in ./entity.features.inc
Implements of hook_features_api().

File

./entity.features.inc, line 17
Provides Features integration for entity types using the CRUD API.

Code

function entity_features_get_controller($type) {
  $static =& drupal_static(__FUNCTION__);
  if (!isset($static[$type])) {
    $info = entity_get_info($type);
    $info += array(
      'features controller class' => 'EntityDefaultFeaturesController',
    );
    $static[$type] = $info['features controller class'] ? new $info['features controller class']($type) : FALSE;
  }
  return $static[$type];
}