You are here

protected function EntityMatcher::buildLabel in Linkit 8.5

Same name and namespace in other branches
  1. 8.4 src/Plugin/Linkit/Matcher/EntityMatcher.php \Drupal\linkit\Plugin\Linkit\Matcher\EntityMatcher::buildLabel()

Builds the label string used in the suggestion.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The matched entity.

Return value

string The label for this entity.

File

src/Plugin/Linkit/Matcher/EntityMatcher.php, line 443

Class

EntityMatcher
Provides default linkit matchers for all entity types.

Namespace

Drupal\linkit\Plugin\Linkit\Matcher

Code

protected function buildLabel(EntityInterface $entity) {
  return Html::escape($entity
    ->label());
}