Goetas\Twital\EventSubscriber\FixHtmlEntitiesInExpressionSubscriber::addPlaceholder PHP 메소드

addPlaceholder() 공개 메소드

public addPlaceholder ( SourceEvent $event )
$event Goetas\Twital\EventDispatcher\SourceEvent
    public function addPlaceholder(SourceEvent $event)
    {
        $source = $event->getTemplate();
        $format = $this->placeholderFormat;
        $source = $this->processTwig($source, function ($twig) use($format) {
            return sprintf($format, htmlspecialchars($twig, ENT_COMPAT, 'UTF-8'));
        });
        $event->setTemplate($source);
    }