Sindbad~EG File Manager

Current Path : /opt/nginxhttpd_/vendor/symfony/maker-bundle/src/Resources/skeleton/twig/
Upload File :
Current File : //opt/nginxhttpd_/vendor/symfony/maker-bundle/src/Resources/skeleton/twig/Extension.tpl.php

<?= "<?php\n" ?>

namespace <?= $namespace; ?>;

use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
use Twig\TwigFunction;

class <?= $class_name ?> extends AbstractExtension
{
    public function getFilters(): array
    {
        return [
            // If your filter generates SAFE HTML, you should add a third
            // parameter: ['is_safe' => ['html']]
            // Reference: https://twig.symfony.com/doc/3.x/advanced.html#automatic-escaping
            new TwigFilter('filter_name', [$this, 'doSomething']),
        ];
    }

    public function getFunctions(): array
    {
        return [
            new TwigFunction('function_name', [$this, 'doSomething']),
        ];
    }

    public function doSomething($value)
    {
        // ...
    }
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists