Browse Source

TwigExtension : ajout user_current

develop
Guillaume 3 years ago
parent
commit
e934b615d7
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      Twig/TwigExtension.php

+ 6
- 0
Twig/TwigExtension.php View File

new TwigFunction('get_form_newsletter', [$this, 'getFormNewsletter']), new TwigFunction('get_form_newsletter', [$this, 'getFormNewsletter']),
new TwigFunction('sov_limit_text', [$this, 'limitText']), new TwigFunction('sov_limit_text', [$this, 'limitText']),
new TwigFunction('day_by_number', [$this, 'getDayByNumber']), new TwigFunction('day_by_number', [$this, 'getDayByNumber']),
new TwigFunction('user_current', [$this, 'getUserCurrent']),
]; ];
} }


return $this->stringComponent->slugify($string) ; return $this->stringComponent->slugify($string) ;
} }


public function getUserCurrent()
{
return $this->security->getUser();
}

} }

Loading…
Cancel
Save