You are here

public function ModalPage::clearText in Modal 8.2

Same name and namespace in other branches
  1. 8.3 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 209

Class

ModalPage
Modal Page Class.

Namespace

Drupal\modal_page

Code

public function clearText(string $text) : string {
  $text = Xss::filter($text, $this
    ->getAllowTags());
  return trim($text);
}