You are here

final class FilteredMarkup in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/filter/src/Render/FilteredMarkup.php \Drupal\filter\Render\FilteredMarkup
  2. 10 core/modules/filter/src/Render/FilteredMarkup.php \Drupal\filter\Render\FilteredMarkup

Defines an object that passes markup through the Filter system.

This object should only be constructed with markup that is safe to render. If there is any risk that the string contains user-entered data that has not been filtered first, it must not be used.

@internal This object is marked as internal because it should only be used in the Filter module on strings that have already been been filtered and sanitized in \Drupal\filter\Plugin\FilterInterface.

Hierarchy

Expanded class hierarchy of FilteredMarkup

See also

\Drupal\Core\Render\Markup

4 files declare their use of FilteredMarkup
FilterCaption.php in core/modules/filter/src/Plugin/Filter/FilterCaption.php
ProcessedText.php in core/modules/filter/src/Element/ProcessedText.php
TextProcessed.php in core/modules/text/src/TextProcessed.php
TextSummaryTest.php in core/modules/text/tests/src/Kernel/TextSummaryTest.php

File

core/modules/filter/src/Render/FilteredMarkup.php, line 22

Namespace

Drupal\filter\Render
View source
final class FilteredMarkup implements MarkupInterface, \Countable {
  use MarkupTrait;

}

Members

Namesort descending Modifiers Type Description Overrides
MarkupTrait::$string protected property The safe string.
MarkupTrait::count public function Returns the string length.
MarkupTrait::create public static function Creates a Markup object if necessary. 2
MarkupTrait::jsonSerialize public function Returns a representation of the object for use in JSON serialization.
MarkupTrait::__toString public function Returns the string version of the Markup object.