mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\MainBundle\Templating\Listing;
|
||||
|
||||
use Twig\Environment;
|
||||
@@ -8,27 +15,25 @@ use Twig\TwigFilter;
|
||||
|
||||
class Templating extends AbstractExtension
|
||||
{
|
||||
|
||||
public function getFilters()
|
||||
{
|
||||
return [
|
||||
public function getFilters()
|
||||
{
|
||||
return [
|
||||
new TwigFilter('chill_render_filter_order_helper', [$this, 'renderFilterOrderHelper'], [
|
||||
'needs_environment' => true, 'is_safe' => ['html'],
|
||||
])
|
||||
];
|
||||
}
|
||||
|
||||
public function renderFilterOrderHelper(
|
||||
Environment $environment,
|
||||
FilterOrderHelper $helper,
|
||||
?string $template = '@ChillMain/FilterOrder/base.html.twig',
|
||||
?array $options = []
|
||||
) {
|
||||
return $environment->render($template, [
|
||||
'helper' => $helper,
|
||||
'form' => $helper->buildForm()->createView(),
|
||||
'options' => $options
|
||||
]);
|
||||
}
|
||||
]),
|
||||
];
|
||||
}
|
||||
|
||||
public function renderFilterOrderHelper(
|
||||
Environment $environment,
|
||||
FilterOrderHelper $helper,
|
||||
?string $template = '@ChillMain/FilterOrder/base.html.twig',
|
||||
?array $options = []
|
||||
) {
|
||||
return $environment->render($template, [
|
||||
'helper' => $helper,
|
||||
'form' => $helper->buildForm()->createView(),
|
||||
'options' => $options,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user