protected function FileMatcher::buildEntityQuery 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::buildEntityQuery()
Builds an EntityQuery to get entities.
Parameters
$match: Text to match the label against.
Return value
\Drupal\Core\Entity\Query\QueryInterface The EntityQuery object with the basic conditions and sorting applied to it.
Overrides EntityMatcher::buildEntityQuery
File
- src/
Plugin/ Linkit/ Matcher/ FileMatcher.php, line 138 - 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 buildEntityQuery($match) {
$query = parent::buildEntityQuery($match);
$query
->condition('status', FILE_STATUS_PERMANENT);
return $query;
}