<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* @bundles/CoreBundle/Form/EventListener/CleanFormSubscriber.php */
class __TwigTemplate_c36f34ed4416fefa8d79fb22891afbb0 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        echo "<?php

namespace Mautic\\CoreBundle\\Form\\EventListener;

use Mautic\\CoreBundle\\Helper\\InputHelper;
use Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;
use Symfony\\Component\\Form\\FormEvent;
use Symfony\\Component\\Form\\FormEvents;

/**
 * Clean data before persisting to DB.
 */
class CleanFormSubscriber implements EventSubscriberInterface
{
    /**
     * @var string|mixed[]
     */
    private \$masks;

    /**
     * @param string|mixed[] \$masks
     */
    public function __construct(\$masks = 'clean')
    {
        \$this->masks = \$masks;
    }

    /**
     * {@inheritdoc}
     */
    public static function getSubscribedEvents()
    {
        return [
            FormEvents::PRE_SUBMIT => 'preSubmitData',
        ];
    }

    public function preSubmitData(FormEvent \$event)
    {
        \$data = \$event->getData();

        // clean the data
        \$data = InputHelper::_(\$data, \$this->masks);

        \$event->setData(\$data);
    }
}
";
    }

    public function getTemplateName()
    {
        return "@bundles/CoreBundle/Form/EventListener/CleanFormSubscriber.php";
    }

    public function getDebugInfo()
    {
        return array (  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "@bundles/CoreBundle/Form/EventListener/CleanFormSubscriber.php", "/var/www/mautic/app/bundles/CoreBundle/Form/EventListener/CleanFormSubscriber.php");
    }
}
