You are here

public function TwigConvert::getFilters in Twig Tools 8

File

src/TwigExtension/TwigConvert.php, line 13

Class

TwigConvert
Class TwigConvert.

Namespace

Drupal\twig_tools\TwigExtension

Code

public function getFilters() {
  return [
    new \Twig_SimpleFilter('boolean', [
      $this,
      'booleanValue',
    ]),
    new \Twig_SimpleFilter('integer', [
      $this,
      'integerValue',
    ]),
    new \Twig_SimpleFilter('float', [
      $this,
      'floatValue',
    ]),
    new \Twig_SimpleFilter('string', [
      $this,
      'stringValue',
    ]),
    new \Twig_SimpleFilter('md5', [
      $this,
      'md5Value',
    ]),
    new \Twig_SimpleFilter('json_decode', [
      $this,
      'jsonDecode',
    ]),
    new \Twig_SimpleFilter('date_from_format', [
      $this,
      'dateFromFormat',
    ]),
  ];
}