PointUrlExtension deprecation fixed.
This commit is contained in:
parent
c2fb2b6dfc
commit
392ead9b3e
|
@ -5,8 +5,7 @@ namespace App\Twig;
|
||||||
|
|
||||||
use App\Entity\User;
|
use App\Entity\User;
|
||||||
use Twig\Extension\AbstractExtension;
|
use Twig\Extension\AbstractExtension;
|
||||||
use Twig\TwigFilter;
|
use Twig\{TwigFilter, TwigFunction};
|
||||||
use Twig\TwigFunction;
|
|
||||||
|
|
||||||
class PointUrlExtension extends AbstractExtension
|
class PointUrlExtension extends AbstractExtension
|
||||||
{
|
{
|
||||||
|
@ -16,7 +15,7 @@ class PointUrlExtension extends AbstractExtension
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFunctions()
|
public function getFunctions(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
new TwigFunction('point_avatar', [$this, 'avatarFunction']),
|
new TwigFunction('point_avatar', [$this, 'avatarFunction']),
|
||||||
|
@ -29,7 +28,7 @@ class PointUrlExtension extends AbstractExtension
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilters()
|
public function getFilters(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
new TwigFilter('point_avatar', [$this, 'avatarFunction']),
|
new TwigFilter('point_avatar', [$this, 'avatarFunction']),
|
||||||
|
|
Loading…
Reference in a new issue