protected function EntityMatcher::buildLabel in Linkit 8.4
Same name and namespace in other branches
- 8.5 src/Plugin/Linkit/Matcher/EntityMatcher.php \Drupal\linkit\Plugin\Linkit\Matcher\EntityMatcher::buildLabel()
Builds the label string used in the match array.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The matched entity.
Return value
string The label for this entity.
1 call to EntityMatcher::buildLabel()
- EntityMatcher::getMatches in src/
Plugin/ Linkit/ Matcher/ EntityMatcher.php - Gets an array with search matches that will be presented in the autocomplete widget.
File
- src/
Plugin/ Linkit/ Matcher/ EntityMatcher.php, line 294 - Contains \Drupal\linkit\Plugin\Linkit\Matcher\EntityMatcher.
Class
- EntityMatcher
- Plugin annotation @Matcher( id = "entity", label = @Translation("Entity"), deriver = "\Drupal\linkit\Plugin\Derivative\EntityMatcherDeriver" )
Namespace
Drupal\linkit\Plugin\Linkit\MatcherCode
protected function buildLabel($entity) {
return Html::escape($entity
->label());
}