class Markup

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Render/Markup.php \Drupal\Core\Render\Markup
  2. 8.9.x core/lib/Drupal/Core/Render/Markup.php \Drupal\Core\Render\Markup
  3. 11.x core/lib/Drupal/Core/Render/Markup.php \Drupal\Core\Render\Markup

Defines an object that passes safe strings through the render system.

This object should only be constructed with a known safe string. 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 whilst rendering.

Hierarchy

Expanded class hierarchy of Markup

See also

\Drupal\Core\Template\TwigExtension::escapeFilter

\Twig\Markup

12 files declare their use of Markup
AttributeTest.php in core/tests/Drupal/Tests/Core/Template/AttributeTest.php
ConfigTest.php in core/tests/Drupal/Tests/Core/Config/ConfigTest.php
errors.inc in core/includes/errors.inc
Functions for error handling.
HtmlTag.php in core/lib/Drupal/Core/Render/Element/HtmlTag.php
LinkGeneratorTest.php in core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php

... See full list

1 string reference to 'Markup'
AjaxRendererTest::setUp in core/tests/Drupal/Tests/Core/Controller/AjaxRendererTest.php

File

core/lib/Drupal/Core/Render/Markup.php, line 22

Namespace

Drupal\Core\Render
View source
final class Markup implements MarkupInterface, \Countable {
  use MarkupTrait;

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.