class Markup
Same name in this branch
- 11.1.x core/lib/Drupal/Core/Render/Markup.php \Drupal\Core\Render\Markup
- 11.1.x core/modules/views/src/Plugin/views/field/Markup.php \Drupal\views\Plugin\views\field\Markup
Marks a content as safe.
@author Fabien Potencier <fabien@symfony.com>
Hierarchy
- class \Twig\Markup implements \Twig\Countable, \Twig\JsonSerializable, \Twig\Stringable
Expanded class hierarchy of Markup
4 files declare their use of Markup
- CoreExtension.php in vendor/
twig/ twig/ src/ Extension/ CoreExtension.php - EscaperRuntime.php in vendor/
twig/ twig/ src/ Runtime/ EscaperRuntime.php - SecurityPolicy.php in vendor/
twig/ twig/ src/ Sandbox/ SecurityPolicy.php - TwigExtension.php in core/
lib/ Drupal/ Core/ Template/ TwigExtension.php
1 string reference to 'Markup'
- views.field.schema.yml in core/
modules/ views/ config/ schema/ views.field.schema.yml - core/modules/views/config/schema/views.field.schema.yml
File
-
vendor/
twig/ twig/ src/ Markup.php, line 19
Namespace
TwigView source
class Markup implements \Countable, \JsonSerializable, \Stringable {
private $content;
private ?string $charset;
public function __construct($content, $charset) {
$this->content = (string) $content;
$this->charset = $charset;
}
public function __toString() {
return $this->content;
}
public function getCharset() : string {
return $this->charset;
}
/**
* @return int
*/
public function count() {
return mb_strlen($this->content, $this->charset);
}
/**
* @return mixed
*/
public function jsonSerialize() {
return $this->content;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
Markup::$charset | private | property | |
Markup::$content | private | property | |
Markup::count | public | function | |
Markup::getCharset | public | function | |
Markup::jsonSerialize | public | function | |
Markup::__construct | public | function | |
Markup::__toString | public | function |