EntityListBuilder::getLabel

protected EntityListBuilder::getLabel(EntityInterface $entity)

Gets the label of an entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity being listed.

Return value

string The entity label.

Deprecated

in Drupal 8.0.x, will be removed before Drupal 9.0.0 Use $entity->label() instead. This method used to escape the entity label. The render system's autoescape is now relied upon.

File

core/lib/Drupal/Core/Entity/EntityListBuilder.php, line 114

Class

EntityListBuilder
Defines a generic implementation to build a listing of entities.

Namespace

Drupal\Core\Entity

Code

protected function getLabel(EntityInterface $entity) {
  return $entity->label();
}
doc_Drupal
2016-10-29 09:06:52
Comments
Leave a Comment

Please login to continue.