function entity_get_info

cis7 entity_get_info($entity_type = NULL)
cle7 entity_get_info($entity_type = NULL)
elmsmedia7 entity_get_info($entity_type = NULL)
icor7 entity_get_info($entity_type = NULL)
meedjum_blog7 entity_get_info($entity_type = NULL)
mooc7 entity_get_info($entity_type = NULL)

Get the entity info array of an entity type.


$entity_type: The entity type, e.g. node, for which the info shall be returned, or NULL to return an array with info about all types.

See also



319 calls to entity_get_info()
accessibility_reporting_views_data_alter in sites/all/modules/ulmus/accessibility/modules/accessibility_reporting/views/
Implements hook_views_data_alter().
better_formats_permission in sites/all/modules/ulmus/better_formats/better_formats.module
Implements of hook_perm().
cis_connector_entity_presave in sites/all/modules/elmsln_contrib/cis_connector/cis_connector.module
Implements hook_entity_presave().
cis_shortcodes_entity_view in sites/all/modules/elmsln_contrib/cis_connector/modules/cis_shortcodes/cis_shortcodes.module
Implements hook_entity_view().
ctools_argument_entity_id_get_children in sites/all/modules/ulmus/ctools/plugins/arguments/

... See full list

2 string references to 'entity_get_info'
entity_info_cache_clear in includes/
Resets the cached information about entity types.
entity_property_verify_data_type in sites/all/modules/ulmus/entity/includes/
Verifies that the given data can be safely used as the given type regardless of the PHP variable type of $data. Example: the string "15" is a valid integer, but "15nodes" is not.


includes/, line 7617
Common functions that many Drupal modules will need to reference.


function entity_get_info($entity_type = NULL) {
  global $language;

  // Use the advanced drupal_static() pattern, since this is called very often.
  static $drupal_static_fast;
  if (!isset($drupal_static_fast)) {
    $drupal_static_fast['entity_info'] = &drupal_static(__FUNCTION__);
  $entity_info = &$drupal_static_fast['entity_info'];

  // hook_entity_info() includes translated strings, so each language is cached
  // separately.
  $langcode = $language->language;

  if (empty($entity_info)) {
    if ($cache = cache_get("entity_info:$langcode")) {
      $entity_info = $cache->data;
    else {
      $entity_info = module_invoke_all('entity_info');
      // Merge in default values.
      foreach ($entity_info as $name => $data) {
        $entity_info[$name] += array(
          'fieldable' => FALSE,
          'controller class' => 'DrupalDefaultEntityController',
          'static cache' => TRUE,
          'field cache' => TRUE,
          'load hook' => $name . '_load',
          'bundles' => array(),
          'view modes' => array(),
          'entity keys' => array(),
          'translation' => array(),
        $entity_info[$name]['entity keys'] += array(
          'revision' => '',
          'bundle' => '',
        foreach ($entity_info[$name]['view modes'] as $view_mode => $view_mode_info) {
          $entity_info[$name]['view modes'][$view_mode] += array(
            'custom settings' => FALSE,
        // If no bundle key is provided, assume a single bundle, named after
        // the entity type.
        if (empty($entity_info[$name]['entity keys']['bundle']) && empty($entity_info[$name]['bundles'])) {
          $entity_info[$name]['bundles'] = array($name => array('label' => $entity_info[$name]['label']));
        // Prepare entity schema fields SQL info for
        // DrupalEntityControllerInterface::buildQuery().
        if (isset($entity_info[$name]['base table'])) {
          $entity_info[$name]['schema_fields_sql']['base table'] = drupal_schema_fields_sql($entity_info[$name]['base table']);
          if (isset($entity_info[$name]['revision table'])) {
            $entity_info[$name]['schema_fields_sql']['revision table'] = drupal_schema_fields_sql($entity_info[$name]['revision table']);
      // Let other modules alter the entity info.
      drupal_alter('entity_info', $entity_info);
      cache_set("entity_info:$langcode", $entity_info);

  if (empty($entity_type)) {
    return $entity_info;
  elseif (isset($entity_info[$entity_type])) {
    return $entity_info[$entity_type];



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.