From de756b456fd4677a6f434ff3a7da396683e8e2a0 Mon Sep 17 00:00:00 2001 From: Awilum Date: Tue, 18 Jun 2019 15:50:59 +0300 Subject: [PATCH] Flextype Core: Snippets API #154 - added ability to access $flextype and $app inside snippets. - display() method removed. - exec() method added. - _display_snippet() method removed. - _exec_snippet() method added. - from now we will set prefix bind_ for all variables. - [snippets] shortcode removed. - [snppets_fetch] shortcode added. - SnippetsTwigExtension: snippets_exec() added. - SnippetsTwigExtension: snippet removed. --- flextype/shortcodes/SnippetsShortcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flextype/shortcodes/SnippetsShortcode.php b/flextype/shortcodes/SnippetsShortcode.php index 0990f878..2cf14b86 100644 --- a/flextype/shortcodes/SnippetsShortcode.php +++ b/flextype/shortcodes/SnippetsShortcode.php @@ -16,6 +16,6 @@ use Thunder\Shortcode\ShortcodeFacade; use Thunder\Shortcode\Shortcode\ShortcodeInterface; // Shortcode: [snippets_fetch id="snippet-name"] -$flextype['shortcodes']->addHandler('snippets', function (ShortcodeInterface $s) use ($flextype) { +$flextype['shortcodes']->addHandler('snippets_fetch', function (ShortcodeInterface $s) use ($flextype) { return $flextype['snippets']->exec($s->getParameter('id')); });