Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix symfony 4.4 "Twig_Extension" #367

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 9 additions & 6 deletions Twig/Extension/UploaderExtension.php
Expand Up @@ -4,7 +4,10 @@

use Oneup\UploaderBundle\Templating\Helper\UploaderHelper;

class UploaderExtension extends \Twig_Extension
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;

class UploaderExtension extends AbstractExtension
{
protected $helper;

Expand All @@ -21,11 +24,11 @@ public function getName()
public function getFunctions()
{
return [
new \Twig_SimpleFunction('oneup_uploader_endpoint', [$this, 'endpoint']),
new \Twig_SimpleFunction('oneup_uploader_progress', [$this, 'progress']),
new \Twig_SimpleFunction('oneup_uploader_cancel', [$this, 'cancel']),
new \Twig_SimpleFunction('oneup_uploader_upload_key', [$this, 'uploadKey']),
new \Twig_SimpleFunction('oneup_uploader_maxsize', [$this, 'maxSize']),
new TwigFunction('oneup_uploader_endpoint', [$this, 'endpoint']),
new TwigFunction('oneup_uploader_progress', [$this, 'progress']),
new TwigFunction('oneup_uploader_cancel', [$this, 'cancel']),
new TwigFunction('oneup_uploader_upload_key', [$this, 'uploadKey']),
new TwigFunction('oneup_uploader_maxsize', [$this, 'maxSize']),
];
}

Expand Down