File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 11<?php
22/**
3- *
3+ * Available Tokens:
4+ * {expression} includes parentheses, e.g ('user')
5+ * {expr} without parentheses, e.g 'user'
6+ * {var} variable name, e.g user
47 */
58
69use View5 \Template ;
10+ use View5 \Token \Expression as Expr ;
711
812return [
913 'auth ' => '<?php ${var} = $this->plugin({expr}); if (${var}->authenticated()) : ?> ' ,
1014 'endAuth ' => '<?php endif; ?> ' ,
11- /*'endAuth' => function(string $expression, Template $template) : string {
12- return '<?php endif; ?>';
15+ /*'auth' => function(string $expression, Template $template) : string {
16+ $var = Expr::var($expression); $plugin = Expr::expr($expression);
17+ return '<?php $' . $var . ' = $this->plugin(' . $plugin . '); if ($' . $var . '->authenticated()) : ?>';
1318 },*/
1419];
You can’t perform that action at this time.
0 commit comments