| 7 common.inc | entity_get_controller($entity_type) |
| 8 entity.module | entity_get_controller($entity_type) |
Get the entity controller class for an entity type.
12 calls to entity_get_controller()
File
- includes/
common.inc, line 7652 - 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];
}
Login or register to post comments