You are here

public static function FilterExtension::basicFormat in Thunder 8.3

Same name and namespace in other branches
  1. 8.5 modules/thunder_article/src/Twig/FilterExtension.php \Drupal\thunder_article\Twig\FilterExtension::basicFormat()
  2. 8.2 modules/thunder_article/src/Twig/FilterExtension.php \Drupal\thunder_article\Twig\FilterExtension::basicFormat()
  3. 8.4 modules/thunder_article/src/Twig/FilterExtension.php \Drupal\thunder_article\Twig\FilterExtension::basicFormat()
  4. 6.2.x modules/thunder_article/src/Twig/FilterExtension.php \Drupal\thunder_article\Twig\FilterExtension::basicFormat()
  5. 6.0.x modules/thunder_article/src/Twig/FilterExtension.php \Drupal\thunder_article\Twig\FilterExtension::basicFormat()
  6. 6.1.x modules/thunder_article/src/Twig/FilterExtension.php \Drupal\thunder_article\Twig\FilterExtension::basicFormat()

Cleans a text and just allow a few tags.

Parameters

string $value: The content to be processed.

Return value

string The processed content.

File

modules/thunder_article/src/Twig/FilterExtension.php, line 58

Class

FilterExtension
Introduce some twig filters.

Namespace

Drupal\thunder_article\Twig

Code

public static function basicFormat($value) {
  $element = render($value);
  $element = strip_tags($element, '<a><em><strong><b><i>');
  return $element;
}