protected function ContactFormMatcher::buildEntityQuery in Linkit 8.5
Builds an EntityQuery to get entities.
Parameters
string $search_string: 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/ ContactFormMatcher.php, line 29
Class
- ContactFormMatcher
- Provides specific linkit matchers for contact forms.
Namespace
Drupal\linkit\Plugin\Linkit\MatcherCode
protected function buildEntityQuery($search_string) {
$query = parent::buildEntityQuery($search_string);
// Remove the personal contact form from the suggestion list.
$query
->condition('id', 'personal', '<>');
return $query;
}