public function ModalPage::clearText in Modal 8.3
Same name and namespace in other branches
- 8.2 src/ModalPage.php \Drupal\modal_page\ModalPage::clearText()
Apply the filter on text.
Parameters
string $text: The text for be cleared.
Return value
string Return the text cleared.
2 calls to ModalPage::clearText()
- ModalPage::checkModalToShow in src/
ModalPage.php - Function to check Modal will show.
- ModalPage::getModalToShow in src/
ModalPage.php - Get modal to show.
File
- src/
ModalPage.php, line 211
Class
- ModalPage
- Modal Page Class.
Namespace
Drupal\modal_pageCode
public function clearText(string $text) : string {
$text = Xss::filter($text, $this
->getAllowTags());
return trim($text);
}