function entity_test_label_callback

Entity label callback.

Parameters

$entity_type: The entity type.

$entity: The entity object.

$langcocde: (optional) The langcode.

Return value

The label of the entity prefixed with "label callback".

1 string reference to 'entity_test_label_callback'
EntityLabelTest::testEntityLabel in drupal/core/modules/system/lib/Drupal/system/Tests/Entity/EntityLabelTest.php
Tests label key and label callback of an entity.

File

drupal/core/modules/system/tests/modules/entity_test/entity_test.module, line 359
Test module for the entity API providing several entity types for testing.

Code

function entity_test_label_callback($entity_type, $entity, $langcode = NULL) {
  return 'label callback ' . $entity->name->value;
}