mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
update constructor
Signed-off-by: Jean-Yves <7360784+docjyJ@users.noreply.github.com>
This commit is contained in:
parent
69d9c925d0
commit
496ec9ba17
13 changed files with 84 additions and 193 deletions
|
|
@ -3,17 +3,13 @@
|
|||
namespace AIO\Twig;
|
||||
|
||||
use Slim\Csrf\Guard;
|
||||
use Twig\Extension\AbstractExtension;
|
||||
use Twig\Extension\GlobalsInterface;
|
||||
|
||||
class CsrfExtension extends \Twig\Extension\AbstractExtension implements \Twig\Extension\GlobalsInterface
|
||||
{
|
||||
/**
|
||||
* @var Guard
|
||||
*/
|
||||
protected Guard $csrf;
|
||||
|
||||
public function __construct(Guard $csrf)
|
||||
{
|
||||
$this->csrf = $csrf;
|
||||
class CsrfExtension extends AbstractExtension implements GlobalsInterface {
|
||||
public function __construct(
|
||||
protected Guard $csrf
|
||||
) {
|
||||
}
|
||||
|
||||
public function getGlobals() : array
|
||||
|
|
@ -35,4 +31,4 @@ class CsrfExtension extends \Twig\Extension\AbstractExtension implements \Twig\E
|
|||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue