CoreMacros
class CoreMacros extends MacroSet
Basic macros for Latte.
- {if ?} ... {elseif ?} ... {else} ... {/if}
- {ifset ?} ... {elseifset ?} ... {/ifset}
- {for ?} ... {/for}
- {foreach ?} ... {/foreach}
- {$variable} with escaping
- {=expression} echo with escaping
- {php expression} evaluate PHP statement
- {_expression} echo translation with escaping
- {attr ?} HTML element attributes
- {capture ?} ... {/capture} capture block to parameter
- {spaceless} ... {/spaceless} compress whitespaces
- {var var => value} set template parameter
- {default var => value} set default template parameter
- {dump $var}
- {debugbreak}
- {contentType ...} HTTP Content-Type header
- {status ...} HTTP status
- {l} {r} to display { }
Methods
void
initialize()
Initializes before template parsing.
array|null
finalize()
Finishes template parsing.
Details
at line 46
static
install(Compiler $compiler)
No description
at line 97
void
initialize()
Initializes before template parsing.
at line 107
array|null
finalize()
Finishes template parsing.