Skip to content
Snippets Groups Projects
Commit 1c17ef26 authored by Julien Grossio's avatar Julien Grossio
Browse files

Fix deprecated usage of TwigExtension

parent 343b8cea
Branches
Tags 8.x-4.11
No related merge requests found
......@@ -3,13 +3,14 @@
namespace Drupal\vk_entity_identifier\TwigExtensions;
use Drupal\vk_entity_identifier\VkEntityIdentifier;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
/**
* Class VkEntityIdentifierTwig
* @package Drupal\vk_entity_identifier\TwigExtensions
*/
class VkEntityIdentifierTwig extends \Twig_Extension
class VkEntityIdentifierTwig extends AbstractExtension
{
/**
* @return array
......@@ -17,7 +18,7 @@ class VkEntityIdentifierTwig extends \Twig_Extension
public function getFunctions()
{
return [
new \Twig_SimpleFunction('vk_entity_identifier_url', [
new TwigFunction('vk_entity_identifier_url', [
$this,
'getEntityUrl',
], ['is_safe' => ['html']]),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment