protected function FileMatcher::buildPath in Linkit 8.4
Same name and namespace in other branches
- 8.5 src/Plugin/Linkit/Matcher/FileMatcher.php \Drupal\linkit\Plugin\Linkit\Matcher\FileMatcher::buildPath()
The file entity still uses url() even though it's deprecated in the entity interface.
Overrides EntityMatcher::buildPath
File
- src/
Plugin/ Linkit/ Matcher/ FileMatcher.php, line 185 - Contains \Drupal\linkit\Plugin\Linkit\Matcher\FileMatcher.
Class
- FileMatcher
- Plugin annotation @Matcher( id = "entity:file", target_entity = "file", label = @Translation("File"), provider = "file" )
Namespace
Drupal\linkit\Plugin\Linkit\MatcherCode
protected function buildPath($entity) {
/** @var \Drupal\file\FileInterface $entity */
return file_url_transform_relative(file_create_url($entity
->getFileUri()));
}