function entity_label

cis7 entity_label($entity_type, $entity)
cle7 entity_label($entity_type, $entity)
elmsmedia7 entity_label($entity_type, $entity)
icor7 entity_label($entity_type, $entity)
meedjum_blog7 entity_label($entity_type, $entity)
mooc7 entity_label($entity_type, $entity)

Returns the label of an entity.

See the 'label callback' component of the hook_entity_info() return value for more information.


$entity_type: The entity type; e.g., 'node' or 'user'.

$entity: The entity for which to generate the label.

Return value

The entity label, or FALSE if not found.

37 calls to entity_label()
editableviews_entity_form_submit_save in sites/all/modules/ulmus/editableviews/editableviews.module
Form submit handler the second: save entities.
Entity::label in sites/all/modules/ulmus/entity/includes/
Returns the label of the entity.
EntityDefaultFeaturesController::export_options in sites/all/modules/ulmus/entity/
Generates the result for hook_features_export_options().
EntityDefaultUIController::applyOperation in sites/all/modules/ulmus/entity/includes/
Applies an operation to the given entity.
EntityDefaultUIController::operationForm in sites/all/modules/ulmus/entity/includes/
Builds the operation form.

... See full list

4 string references to 'entity_label'
EntityDefaultUIController::hook_menu in sites/all/modules/ulmus/entity/includes/
Provides definitions for implementing hook_menu().
file_entity_menu in sites/all/modules/ulmus/file_entity/file_entity.module
Implements hook_menu().
og-7.x-1.x.database.php in sites/all/modules/ulmus/og/tests/og-7.x-1.x.database.php
Filled installation of Drupal 7.0, for test purposes.
taxonomy_menu in modules/taxonomy/taxonomy.module
Implements hook_menu().


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


function entity_label($entity_type, $entity) {
  $label = FALSE;
  $info = entity_get_info($entity_type);
  if (isset($info['label callback']) && function_exists($info['label callback'])) {
    $label = $info['label callback']($entity, $entity_type);
  elseif (!empty($info['entity keys']['label']) && isset($entity->{$info['entity keys']['label']})) {
    $label = $entity->{$info['entity keys']['label']};

  return $label;



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.