Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EscaperRuntime.php

function EscaperRuntime::setEscaper

Defines a new escaper to be used via the escape filter.

Parameters

string $strategy The strategy name that should be used as a strategy in the escape call:

callable(string $string, string $charset): string $callable A valid PHP callable:

File

vendor/twig/twig/src/Runtime/EscaperRuntime.php, line 40

Class

EscaperRuntime

Namespace

Twig\Runtime

Code

public function setEscaper($strategy, callable $callable) {
    $this->escapers[$strategy] = $callable;
}
RSS feed
Powered by Drupal