mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
complete missing annotations
This commit is contained in:
@@ -27,22 +27,31 @@ use Twig\Extension\AbstractExtension;
|
||||
use Twig\Environment;
|
||||
|
||||
/**
|
||||
* Class TwigCRUDResolver
|
||||
* Twig filters to display data in crud template
|
||||
*
|
||||
* @package Chill\MainBundle\CRUD\Templating
|
||||
*/
|
||||
class TwigCRUDResolver extends AbstractExtension
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @var Resolver
|
||||
*/
|
||||
protected $resolver;
|
||||
|
||||
/**
|
||||
* TwigCRUDResolver constructor.
|
||||
*
|
||||
* @param Resolver $resolver
|
||||
*/
|
||||
function __construct(Resolver $resolver)
|
||||
{
|
||||
$this->resolver = $resolver;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array|TwigFunction[]
|
||||
*/
|
||||
public function getFunctions()
|
||||
{
|
||||
return [
|
||||
@@ -53,11 +62,22 @@ class TwigCRUDResolver extends AbstractExtension
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $configKey
|
||||
* @param $crudName
|
||||
* @param null $action
|
||||
* @return string
|
||||
*/
|
||||
public function getConfig($configKey, $crudName, $action = null)
|
||||
{
|
||||
return $this->resolver->getConfigValue($configKey, $crudName, $action);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $crudName
|
||||
* @param $action
|
||||
* @return bool
|
||||
*/
|
||||
public function hasAction($crudName, $action)
|
||||
{
|
||||
return $this->resolver->hasAction($crudName, $action);
|
||||
|
Reference in New Issue
Block a user