protected function FileMatcher::buildPath in Linkit 8.5
Same name and namespace in other branches
- 8.4 src/Plugin/Linkit/Matcher/FileMatcher.php \Drupal\linkit\Plugin\Linkit\Matcher\FileMatcher::buildPath()
Builds the path string used in the suggestion.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The matched entity.
Return value
string The path for this entity.
Overrides EntityMatcher::buildPath
File
- src/
Plugin/ Linkit/ Matcher/ FileMatcher.php, line 227
Class
- FileMatcher
- Provides specific linkit matchers for the file entity type.
Namespace
Drupal\linkit\Plugin\Linkit\MatcherCode
protected function buildPath(EntityInterface $entity) {
/** @var \Drupal\file\FileInterface $entity */
return file_url_transform_relative(file_create_url($entity
->getFileUri()));
}