mirror of
https://github.com/flextype/flextype.git
synced 2025-08-24 13:52:56 +02:00
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.
This commit is contained in:
@@ -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'));
|
||||
});
|
||||
|
Reference in New Issue
Block a user