Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • none

Classes

  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class CoreMacros

Basic macros for Latte.

  • {if ?} ... {elseif ?} ... {else} ... {/if}
  • {ifset ?} ... {elseifset ?} ... {/ifset}
  • {for ?} ... {/for}
  • {foreach ?} ... {/foreach}
  • {$variable} with escaping
  • {!$variable} without escaping
  • {=expression} echo with escaping
  • {!=expression} echo without escaping
  • {?expression} evaluate PHP statement
  • {_expression} echo translation with escaping
  • {!_expression} echo translation without escaping
  • {attr ?} HTML element attributes
  • {capture ?} ... {/capture} capture block to parameter
  • {var var => value} set template parameter
  • {default var => value} set default template parameter
  • {dump $var}
  • {debugbreak}
  • {l} {r} to display { }
Object
Extended by MacroSet implements IMacro
Extended by CoreMacros
Package: Nette\Latte\Macros
Author: David Grudl
Located at Latte/Macros/CoreMacros.php
Methods summary
public static
# install( LatteCompiler $compiler )

Overrides

MacroSet::install()
public array(prolog,
# finalize( )

Finishes template parsing.

Finishes template parsing.

Returns

array(prolog,
epilog)

Overrides

MacroSet::finalize()
public
# macroIf( MacroNode $node, PhpWriter $writer )

{if ...}

{if ...}

public
# macroEndIf( MacroNode $node, PhpWriter $writer )

{/if ...}

{/if ...}

public
# macroElse( MacroNode $node, PhpWriter $writer )

{else}

{else}

public
# macroTranslate( MacroNode $node, PhpWriter $writer )

{_$var |modifiers}

{_$var |modifiers}

public
# macroInclude( MacroNode $node, PhpWriter $writer )

{include "file" [,] [params]}

{include "file" [,] [params]}

public
# macroUse( MacroNode $node, PhpWriter $writer )

{use class MacroSet}

{use class MacroSet}

public
# macroCapture( MacroNode $node, PhpWriter $writer )

{capture $variable}

{capture $variable}

public
# macroCaptureEnd( MacroNode $node, PhpWriter $writer )

{/capture}

{/capture}

public
# macroEndForeach( MacroNode $node, PhpWriter $writer )

{foreach ...}

{foreach ...}

public
# macroClass( MacroNode $node, PhpWriter $writer )

n:class="..."

n:class="..."

public
# macroAttr( MacroNode $node, PhpWriter $writer )

n:attr="..."

n:attr="..."

public
# macroOldAttr( MacroNode $node )

{attr ...}

{attr ...}

Deprecated

public
# macroDump( MacroNode $node, PhpWriter $writer )

{dump ...}

{dump ...}

public
# macroDebugbreak( MacroNode $node, PhpWriter $writer )

{debugbreak ...}

{debugbreak ...}

public
# macroVar( MacroNode $node, PhpWriter $writer )

{var ...} {default ...}

{var ...} {default ...}

public
# macroExpr( MacroNode $node, PhpWriter $writer )

{= ...} {? ...}

{= ...} {? ...}

public static Template
# includeTemplate( mixed $destination, array $params, ITemplate $template )

Includes subtemplate.

Includes subtemplate.

Parameters

$destination
mixed
included file name or template
$params
array
parameters
$template
ITemplate
current template

Returns

Template
public static stdClass
# initRuntime( ITemplate $template, $templateId )

Initializes local & global storage in template.

Initializes local & global storage in template.

Returns

stdClass
Methods inherited from MacroSet
__construct(), addMacro(), getCompiler(), initialize(), nodeClosed(), nodeOpened()
Methods inherited from Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Magic properties inherited from Object
$reflection
Nette Framework 2.0.18 (for PHP 5.2, un-prefixed) API documentation generated by ApiGen 2.8.0