public function MentionsFilter::shouldApplyFilter in Open Social 8.9
Same name and namespace in other branches
- 8 modules/custom/mentions/src/Plugin/Filter/MentionsFilter.php \Drupal\mentions\Plugin\Filter\MentionsFilter::shouldApplyFilter()
- 8.2 modules/custom/mentions/src/Plugin/Filter/MentionsFilter.php \Drupal\mentions\Plugin\Filter\MentionsFilter::shouldApplyFilter()
- 8.3 modules/custom/mentions/src/Plugin/Filter/MentionsFilter.php \Drupal\mentions\Plugin\Filter\MentionsFilter::shouldApplyFilter()
- 8.4 modules/custom/mentions/src/Plugin/Filter/MentionsFilter.php \Drupal\mentions\Plugin\Filter\MentionsFilter::shouldApplyFilter()
- 8.5 modules/custom/mentions/src/Plugin/Filter/MentionsFilter.php \Drupal\mentions\Plugin\Filter\MentionsFilter::shouldApplyFilter()
- 8.6 modules/custom/mentions/src/Plugin/Filter/MentionsFilter.php \Drupal\mentions\Plugin\Filter\MentionsFilter::shouldApplyFilter()
- 8.7 modules/custom/mentions/src/Plugin/Filter/MentionsFilter.php \Drupal\mentions\Plugin\Filter\MentionsFilter::shouldApplyFilter()
- 8.8 modules/custom/mentions/src/Plugin/Filter/MentionsFilter.php \Drupal\mentions\Plugin\Filter\MentionsFilter::shouldApplyFilter()
- 10.3.x modules/custom/mentions/src/Plugin/Filter/MentionsFilter.php \Drupal\mentions\Plugin\Filter\MentionsFilter::shouldApplyFilter()
- 10.0.x modules/custom/mentions/src/Plugin/Filter/MentionsFilter.php \Drupal\mentions\Plugin\Filter\MentionsFilter::shouldApplyFilter()
- 10.1.x modules/custom/mentions/src/Plugin/Filter/MentionsFilter.php \Drupal\mentions\Plugin\Filter\MentionsFilter::shouldApplyFilter()
- 10.2.x modules/custom/mentions/src/Plugin/Filter/MentionsFilter.php \Drupal\mentions\Plugin\Filter\MentionsFilter::shouldApplyFilter()
Checks if a textFormat filter should be applied.
Return value
bool TRUE if filter should applied, otherwise FALSE.
1 call to MentionsFilter::shouldApplyFilter()
- MentionsFilter::process in modules/
custom/ mentions/ src/ Plugin/ Filter/ MentionsFilter.php - Performs the filter processing.
File
- modules/
custom/ mentions/ src/ Plugin/ Filter/ MentionsFilter.php, line 126
Class
- MentionsFilter
- Class FilterMentions.
Namespace
Drupal\mentions\Plugin\FilterCode
public function shouldApplyFilter() {
if ($this
->checkMentionTypes()) {
return TRUE;
}
elseif ($this->textFormat && ($format = FilterFormat::load($this->textFormat))) {
$filters = $format
->get('filters');
if (!empty($filters['filter_mentions']['status'])) {
$this->settings = $filters['filter_mentions']['settings'];
return $this
->checkMentionTypes();
}
}
return FALSE;
}