protected function Entity::defaultLabel

cis7 entity.inc protected Entity::defaultLabel()
cle7 entity.inc protected Entity::defaultLabel()
elmsmedia7 entity.inc protected Entity::defaultLabel()
icor7 entity.inc protected Entity::defaultLabel()
meedjum_blog7 entity.inc protected Entity::defaultLabel()
mooc7 entity.inc protected Entity::defaultLabel()

Defines the entity label if the 'entity_class_label' callback is used.

Specify 'entity_class_label' as 'label callback' in hook_entity_info() to let the entity label point to this method. Override this in order to implement a custom default label.

1 call to Entity::defaultLabel()
Entity::label in sites/all/modules/ulmus/entity/includes/entity.inc
Returns the label of the entity.
1 method overrides Entity::defaultLabel()
EntityClass::defaultLabel in sites/all/modules/ulmus/entity/tests/entity_test.module
Specifies the default label, which is picked up by label() by default.

File

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

Class

Entity
A common class for entities.

Code

protected function defaultLabel() {
  // Add in the translated specified label property.
  return $this->getTranslation($this->entityInfo['entity keys']['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.