entity_page_label(EntityInterface $entity, $langcode = NULL)
Returns the label of an entity.
$entity->label($langcode);
\Drupal\Core\Entity\EntityInterface $entity: The entity for which to generate the label.
$langcode: (optional) The language code of the language that should be used for getting the label. If set to NULL, the entity's default language is used.
string|null The label of the entity, or NULL if there is no label defined.
as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use the entity's label() method to get the label of the entity:
\Drupal\Core\Entity\EntityInterface::label()
function entity_page_label(EntityInterface $entity, $langcode = NULL) { return $entity->label($langcode); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!entity.inc/function/entity_page_label/8.1.x