public function ModalPageService::clearText in Modal 4.0.x
Same name and namespace in other branches
- 5.0.x src/Service/ModalPageService.php \Drupal\modal_page\Service\ModalPageService::clearText()
- 4.1.x src/Service/ModalPageService.php \Drupal\modal_page\Service\ModalPageService::clearText()
Apply the filter on text.
2 calls to ModalPageService::clearText()
- ModalPageService::getModalsToShow in src/
Service/ ModalPageService.php - Method to Get Modals to show.
- ModalPageService::loadModalsToShow in src/
Service/ ModalPageService.php - Get modal to show.
File
- src/
Service/ ModalPageService.php, line 342
Class
- ModalPageService
- Modal Page Service Class.
Namespace
Drupal\modal_page\ServiceCode
public function clearText($text) {
if (empty(is_string($text))) {
$text = (string) $text;
}
$text = Xss::filter($text, $this
->getAllowTags());
return trim($text);
}