MarkupTrait::__toString

public MarkupTrait::__toString() Returns the string version of the Markup object. Return value string The safe string content. Overrides MarkupInterface::__toString File core/lib/Drupal/Component/Render/MarkupTrait.php, line 53 Class MarkupTrait Implements MarkupInterface and Countable for rendered objects. Namespace Drupal\Component\Render Code public function __toString() { return $this->string; }

MarkupTrait::jsonSerialize

public MarkupTrait::jsonSerialize() Returns a representation of the object for use in JSON serialization. Return value string The safe string content. File core/lib/Drupal/Component/Render/MarkupTrait.php, line 73 Class MarkupTrait Implements MarkupInterface and Countable for rendered objects. Namespace Drupal\Component\Render Code public function jsonSerialize() { return $this->__toString(); }

MarkupTrait::create

public static MarkupTrait::create($string) Creates a Markup object if necessary. If $string is equal to a blank string then it is not necessary to create a Markup object. If $string is an object that implements MarkupInterface it is returned unchanged. Parameters mixed $string: The string to mark as safe. This value will be cast to a string. Return value string|\Drupal\Component\Render\MarkupInterface A safe string. File core/lib/Drupal/Component/Render/MarkupTrait.php, line 34 Class Mark

MarkupTrait::count

public MarkupTrait::count() Returns the string length. Return value int The length of the string. File core/lib/Drupal/Component/Render/MarkupTrait.php, line 63 Class MarkupTrait Implements MarkupInterface and Countable for rendered objects. Namespace Drupal\Component\Render Code public function count() { return Unicode::strlen($this->string); }

MarkupTrait::$string

The safe string. Type: string File core/lib/Drupal/Component/Render/MarkupTrait.php, line 19 Class MarkupTrait Implements MarkupInterface and Countable for rendered objects. Namespace Drupal\Component\Render Code protected $string;

MarkupTrait

Implements MarkupInterface and Countable for rendered objects. Hierarchy trait \Drupal\Component\Render\MarkupTrait See also \Drupal\Component\Render\MarkupInterface File core/lib/Drupal/Component/Render/MarkupTrait.php, line 12 Namespace Drupal\Component\Render Members Name Modifiers Type Description MarkupTrait::$string protected property The safe string. MarkupTrait::count public function Returns the string length. MarkupTrait::create public static func

MarkupInterface::__toString

public MarkupInterface::__toString() Returns markup. Return value string The markup. File core/lib/Drupal/Component/Render/MarkupInterface.php, line 40 Class MarkupInterface Marks an object's __toString() method as returning markup. Namespace Drupal\Component\Render Code public function __toString();

MarkupInterface

Marks an object's __toString() method as returning markup. Objects that implement this interface will not be automatically XSS filtered by the render system or automatically escaped by the theme engine. If there is any risk of the object's __toString() method returning user-entered data that has not been filtered first, it must not be used. If the object that implements this does not perform automatic escaping or filtering itself, then it must be marked as "@internal". For example, Views has th

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 class \Drupal\Core\Render\Markup implements \Countable, MarkupInterface uses MarkupTrait See also \Drupal\Core\Template\TwigExtension::esc

mark.html.twig

Default theme implementation for a marker for new or updated content. Available variables: status: Number representing the marker status to display. Use the constants below for comparison: MARK_NEW MARK_UPDATED MARK_READ File core/modules/system/templates/mark.html.twig Related topics Theme system overview Functions and templates for the user interface that themes can override.