Skip to content

Commit 8a46072

Browse files
committed
feat(core): use new TWIG Plugin 1.7.0
1 parent 8c37d98 commit 8a46072

File tree

3 files changed

+8
-153
lines changed

3 files changed

+8
-153
lines changed

app/Models/Acl.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@
1919

2020
class Acl
2121
{
22-
/**
23-
* __construct
24-
*/
25-
public function __construct()
26-
{
27-
28-
}
29-
3022
/**
3123
* Check is user logged in
3224
*

dependencies.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,18 @@
1313

1414
use Flextype\Plugin\Acl\Models\Acl;
1515
use Flextype\Plugin\Acl\Twig\AclTwigExtension;
16+
use Flextype\Plugin\Twig\Twig\FlextypeTwig;
17+
use Flextype\Foundation\Entries\Entries;
18+
use Flextype\Plugin\Twig\Twig\FlextypeEntriesTwig;
19+
1620

1721
/**
1822
* Add ACL Model to Flextype container
1923
*/
20-
flextype()->container()['acl'] = static function () {
21-
return new Acl();
22-
};
24+
flextype()->container()['acl'] = fn() => new Acl();
25+
2326

2427
/**
25-
* Add ACL Twig Extension to Flextype container
28+
* Add ACL Model to Flextype Twig
2629
*/
27-
flextype('twig')->addExtension(new AclTwigExtension());
30+
FlextypeTwig::macro('acl', fn() => flextype('acl'));

twig/AclTwigExtension.php

Lines changed: 0 additions & 140 deletions
This file was deleted.

0 commit comments

Comments
 (0)