public function Entity::label

cis7 entity.inc public Entity::label()
cle7 entity.inc public Entity::label()
elmsmedia7 entity.inc public Entity::label()
icor7 entity.inc public Entity::label()
meedjum_blog7 entity.inc public Entity::label()
mooc7 entity.inc public Entity::label()

Returns the label of the entity.

Modules may alter the label by specifying another 'label callback' using hook_entity_info_alter().

See also

entity_label()

File

sites/all/modules/ulmus/entity/includes/entity.inc, line 122
Provides a base class for entities.

Class

Entity
A common class for entities.

Code

public function label() {
  // If the default label flag is enabled, this is being invoked recursively.
  // In this case we need to use our default label callback directly. This may
  // happen if a module provides a label callback implementation different
  // from ours, but then invokes Entity::label() or entity_class_label() from
  // there.
  if ($this->defaultLabel || (isset($this->entityInfo['label callback']) && $this->entityInfo['label callback'] == 'entity_class_label')) {
    return $this->defaultLabel();
  }
  $this->defaultLabel = TRUE;
  $label = entity_label($this->entityType, $this);
  $this->defaultLabel = FALSE;
  return $label;
}
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.