protected function KeywordFilter::match in Tamper 8
Determines whether we get a keyword filter match.
1 call to KeywordFilter::match()
- KeywordFilter::tamper in src/
Plugin/ Tamper/ KeywordFilter.php - Tamper data.
File
- src/
Plugin/ Tamper/ KeywordFilter.php, line 227
Class
- KeywordFilter
- Plugin implementation for filtering based on a list of words/phrases.
Namespace
Drupal\tamper\Plugin\TamperCode
protected function match($match_func, $field, array $word_list) {
foreach ($word_list as $word) {
if ($match_func == "matchRegex") {
if ($this
->{$match_func}($field, $word) !== FALSE) {
return TRUE;
}
}
elseif ($match_func($field, $word) !== FALSE) {
return TRUE;
}
}
return FALSE;
}