Class LatteMacros
Default macros for filter LatteFilter.
- {$variable} with escaping
- {!$variable} without escaping
- {*comment*} will be removed
- {=expression} echo with escaping
- {!=expression} echo without escaping
- {?expression} evaluate PHP statement
- {_expression} echo translation with escaping
- {!_expression} echo translation without escaping
- {link destination ...} control link
- {plink destination ...} presenter link
- {if ?} ... {elseif ?} ... {else} ... {/if}
- {ifset ?} ... {elseifset ?} ... {/if}
- {for ?} ... {/for}
- {foreach ?} ... {/foreach}
- {include ?}
- {cache ?} ... {/cache} cached block
- {snippet ?} ... {/snippet ?} control snippet
- {attr ?} HTML element attributes
- {block|texy} ... {/block} block
- {contentType ...} HTTP Content-Type header
- {status ...} HTTP status
- {capture ?} ... {/capture} capture block to parameter
- {var var => value} set template parameter
- {default var => value} set default template parameter
- {dump $var}
- {debugbreak}
- Nette\Object
- 
			 Nette\Templates\LatteMacros Nette\Templates\LatteMacros
Direct known subclasses
Nette\Templates\CurlyBracketsMacros| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			string
			
			 | |
| 
			
			 public 
			string
			
			 | |
| 
			
			 public 
			string
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public 
			
			
			 | |
| 
			
			 public static
			
			
			 | |
| 
			
			 public static
			
			
			 | |
| 
			
			 public static
			 | 
		#
		 includeTemplate( mixed $destination, array $params, Includes subtemplate. | 
| 
			
			 public static
			 | 
		#
		 initRuntime( Initializes state holder $_cb in template. | 
| 
__call(), 
__callStatic(), 
__get(), 
__isset(), 
__set(), 
__unset(), 
extensionMethod(), 
getReflection()
		 | 
| 
			
			integer
		 | 
				BLOCK_NAMED
		 | 1 | |
| 
			
			integer
		 | 
				BLOCK_CAPTURE
		 | 2 | |
| 
			
			integer
		 | 
				BLOCK_ANONYMOUS
		 | 3 | 
| 
			
			public static
			array
		 | $defaultMacros | array(
	'syntax' => '%:macroSyntax%',
	'/syntax' => '%:macroSyntax%',
	'block' => '<?php %:macroBlock% ?>',
	'/block' => '<?php %:macroBlockEnd% ?>',
	'capture' => '<?php %:macroCapture% ?>',
	'/capture' => '<?php %:macroCaptureEnd% ?>',
	'snippet' => '<?php %:macroSnippet% ?>',
	'/snippet' => '<?php %:macroSnippetEnd% ?>',
	'cache' => '<?php if ($_cb->foo = Nette\Templates\CachingHelper::create($_cb->key = md5(__FILE__) . __LINE__, $template->getFile(), array(%%))) { $_cb->caches[] = $_cb->foo ?>',
	'/cache' => '<?php array_pop($_cb->caches)->save(); } if (!empty($_cb->caches)) end($_cb->caches)->addItem($_cb->key) ?>',
	'if' => '<?php if (%%): ?>',
	'elseif' => '<?php elseif (%%): ?>',
	'else' => '<?php else: ?>',
	'/if' => '<?php endif ?>',
	'ifset' => '<?php if (isset(%%)): ?>',
	'/ifset' => '<?php endif ?>',
	'elseifset' => '<?php elseif (isset(%%)): ?>',
	'foreach' => '<?php foreach (%:macroForeach%): ?>',
	'/foreach' => '<?php endforeach; array_pop($_cb->its); $iterator = end($_cb->its) ?>',
	'for' => '<?php for (%%): ?>',
	'/for' => '<?php endfor ?>',
	'while' => '<?php while (%%): ?>',
	'/while' => '<?php endwhile ?>',
	'continueIf' => '<?php if (%%) continue ?>',
	'breakIf' => '<?php if (%%) break ?>',
	'include' => '<?php %:macroInclude% ?>',
	'extends' => '<?php %:macroExtends% ?>',
	'layout' => '<?php %:macroExtends% ?>',
	'plink' => '<?php echo %:macroEscape%(%:macroPlink%) ?>',
	'link' => '<?php echo %:macroEscape%(%:macroLink%) ?>',
	'ifCurrent' => '<?php %:macroIfCurrent%; if ($presenter->getLastCreatedRequestFlag("current")): ?>',
	'/ifCurrent' => '<?php endif ?>',
	'widget' => '<?php %:macroWidget% ?>',
	'control' => '<?php %:macroWidget% ?>',
	'attr' => '<?php echo Nette\Web\Html::el(NULL)->%:macroAttr%attributes() ?>',
	'contentType' => '<?php %:macroContentType% ?>',
	'status' => '<?php Nette\Environment::getHttpResponse()->setCode(%%) ?>',
	'var' => '<?php %:macroAssign% ?>',
	'assign' => '<?php %:macroAssign% ?>',
	'default' => '<?php %:macroDefault% ?>',
	'dump' => '<?php Nette\Debug::consoleDump(%:macroDump%, "Template " . str_replace(Nette\Environment::getVariable("appDir"), "\xE2\x80\xA6", $template->getFile())) ?>',
	'debugbreak' => '<?php if (function_exists("debugbreak")) debugbreak(); elseif (function_exists("xdebug_break")) xdebug_break() ?>',
	'!_' => '<?php echo %:macroTranslate% ?>',
	'!=' => '<?php echo %:macroModifiers% ?>',
	'_' => '<?php echo %:macroEscape%(%:macroTranslate%) ?>',
	'=' => '<?php echo %:macroEscape%(%:macroModifiers%) ?>',
	'!$' => '<?php echo %:macroVar% ?>',
	'!' => '<?php echo %:macroVar% ?>', // deprecated
	'$' => '<?php echo %:macroEscape%(%:macroVar%) ?>',
	'?' => '<?php %:macroModifiers% ?>', // deprecated?
) | |
| 
			
			public 
			array
		 | $macros |  |