You are here

function entity_get_extra_fields_controller in Entity API 7

Gets the extra field controller class for a given entity type.

Return value

EntityExtraFieldsControllerInterface|false The controller for the given entity type or FALSE if none is specified.

1 call to entity_get_extra_fields_controller()
EntityAPIController::buildContent in includes/entity.controller.inc
Implements EntityAPIControllerInterface.

File

./entity.module, line 1374

Code

function entity_get_extra_fields_controller($type = NULL) {
  $static =& drupal_static(__FUNCTION__);
  if (!isset($static[$type])) {
    $static[$type] = FALSE;
    $info = entity_get_info($type);
    if (!empty($info['extra fields controller class'])) {
      $static[$type] = new $info['extra fields controller class']($type);
    }
  }
  return $static[$type];
}