function entity_get_controller

cis7 common.inc entity_get_controller($entity_type)
cle7 common.inc entity_get_controller($entity_type)
elmsmedia7 common.inc entity_get_controller($entity_type)
icor7 common.inc entity_get_controller($entity_type)
meedjum_blog7 common.inc entity_get_controller($entity_type)
mooc7 common.inc entity_get_controller($entity_type)

Get the entity controller class for an entity type.

54 calls to entity_get_controller()
accessibility_test_save in sites/all/modules/ulmus/accessibility/accessibility.module
Saves an accessibility test entity.
display_cache_view_entity in sites/all/modules/ulmus/display_cache/display_cache.module
Alternative entity view callback.
Entity::buildContent in sites/all/modules/ulmus/entity/includes/entity.inc
Builds a structured array representing the entity's content.
Entity::delete in sites/all/modules/ulmus/entity/includes/entity.inc
Permanently deletes the entity.
Entity::export in sites/all/modules/ulmus/entity/includes/entity.inc
Exports the entity.

... See full list

File

includes/common.inc, line 7832
Common functions that many Drupal modules will need to reference.

Code

function entity_get_controller($entity_type) {
  $controllers = &drupal_static(__FUNCTION__, array());
  if (!isset($controllers[$entity_type])) {
    $type_info = entity_get_info($entity_type);
    $class = $type_info['controller class'];
    $controllers[$entity_type] = new $class($entity_type);
  }
  return $controllers[$entity_type];
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.