Full ELMS Learning Network documentation
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.
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];
}