mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-08 05:08:25 +00:00
apply rector rules
This commit is contained in:
@@ -13,9 +13,7 @@ namespace Chill\MainBundle\Templating;
|
||||
|
||||
use Symfony\Bridge\Twig\Extension\RoutingExtension;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Twig\Extension\AbstractExtension;
|
||||
use Twig\Node\Node;
|
||||
use Twig\TwigFilter;
|
||||
use Twig\TwigFunction;
|
||||
|
||||
/**
|
||||
@@ -23,7 +21,7 @@ use Twig\TwigFunction;
|
||||
*
|
||||
* The logic of the function is based on the original routing extension.
|
||||
*/
|
||||
class ChillTwigRoutingHelper extends AbstractExtension
|
||||
class ChillTwigRoutingHelper
|
||||
{
|
||||
/**
|
||||
* @var RoutingExtension
|
||||
@@ -43,13 +41,6 @@ class ChillTwigRoutingHelper extends AbstractExtension
|
||||
$this->originalExtension = $originalExtension;
|
||||
}
|
||||
|
||||
public function getFilters()
|
||||
{
|
||||
return [
|
||||
new TwigFilter('chill_return_path_label', $this->getLabelReturnPath(...)),
|
||||
];
|
||||
}
|
||||
|
||||
public function getFunctions()
|
||||
{
|
||||
return [
|
||||
@@ -82,6 +73,7 @@ class ChillTwigRoutingHelper extends AbstractExtension
|
||||
return $this->originalExtension->getPath($name, $params, $relative);
|
||||
}
|
||||
|
||||
#[\Twig\Attribute\AsTwigFilter('chill_return_path_label')]
|
||||
public function getLabelReturnPath($default)
|
||||
{
|
||||
$request = $this->requestStack->getCurrentRequest();
|
||||
|
||||
Reference in New Issue
Block a user