mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 05:44:58 +00:00
[crud] clean and add documentation
This commit is contained in:
@@ -43,14 +43,6 @@ class TwigCRUDResolver extends AbstractExtension
|
||||
$this->resolver = $resolver;
|
||||
}
|
||||
|
||||
public function getFilters()
|
||||
{
|
||||
return [
|
||||
new TwigFilter('chill_crud_display', [$this, 'display'],
|
||||
['needs_environment' => true, 'is_safe' => ['html']])
|
||||
];
|
||||
}
|
||||
|
||||
public function getFunctions()
|
||||
{
|
||||
return [
|
||||
@@ -59,14 +51,6 @@ class TwigCRUDResolver extends AbstractExtension
|
||||
];
|
||||
}
|
||||
|
||||
public function display(Environment $env, $entity, $path): string
|
||||
{
|
||||
$data = $this->resolver->getData($entity, $path);
|
||||
$template = $this->resolver->getTwigTemplate($entity, $path);
|
||||
|
||||
return $env->render($template, ['data' => $data, 'entity' => $entity, ]);
|
||||
}
|
||||
|
||||
public function getConfig($configKey, $crudName, $action = null)
|
||||
{
|
||||
return $this->resolver->getConfigValue($configKey, $crudName, $action);
|
||||
|
Reference in New Issue
Block a user