Dotclear 2.25
Loading...
Searching...
No Matches
tplNodeBlockDefinition Class Reference

Block node, for all <tpl:Tag>...</tpl:Tag> More...

Inheritance diagram for tplNodeBlockDefinition:
tplNodeBlock tplNode

Public Member Functions

 __construct (string $tag, array $attr)
 
 setClosing ()
 
 compile (template $tpl)
 
- Public Member Functions inherited from tplNodeBlock
 __construct (string $tag, array $attr)
 
 setClosing ()
 
 isClosed ()
 
 compile (template $tpl)
 
 getTag ()
 
- Public Member Functions inherited from tplNode
 __construct ()
 
 setClosing ()
 
 compile (template $tpl)
 
 addChild ($child)
 
 setChildren ($children)
 
 getParent ()
 
 getTag ()
 

Static Public Member Functions

static renderParent (template $tpl)
 
static reset ()
 
static getStackBlock (string $name, template $tpl)
 

Protected Attributes

 $name
 
- Protected Attributes inherited from tplNodeBlock
 $tag
 
 $attr
 
 $closed
 
 $content
 
- Protected Attributes inherited from tplNode
 $parentNode
 
 $children
 

Static Protected Attributes

static $stack = []
 
static $current_block = null
 

Additional Inherited Members

- Protected Member Functions inherited from tplNode
 setParent ($parent)
 

Detailed Description

Block node, for all <tpl:Tag>...</tpl:Tag>

Constructor & Destructor Documentation

◆ __construct()

__construct ( string  $tag,
array  $attr 
)

Block definition specific constructor : keep block name in mind

Parameters
string$tagCurrent tag (might be "Block")
array$attrTag attributes (must contain "name" attribute)

Reimplemented from tplNodeBlock.

References tplNodeBlock\$attr, and tplNodeBlock\$tag.

Member Function Documentation

◆ renderParent()

static renderParent ( template  $tpl)
static

Renders the parent block of currently being displayed block

Parameters
template$tplThe current template engine instance
Returns
string The compiled parent block

References getStackBlock().

Referenced by tplNodeValueParent\compile().

◆ reset()

static reset ( )
static

resets blocks stack

◆ getStackBlock()

static getStackBlock ( string  $name,
template  $tpl 
)
static

Retrieves block defined in call stack

Parameters
string$nameThe block name
template$tplThe current template engine instance
Returns
string The block (empty string if unavailable)

References $name, $ret, and $stack.

Referenced by renderParent().

◆ setClosing()

setClosing ( )

Override tag closing processing. Here we enrich the block stack to keep block history.

Reimplemented from tplNodeBlock.

References tplNode\$children, and $name.

◆ compile()

compile ( template  $tpl)

Compile the block definition : grab latest block content being defined

Parameters
template$tplThe current template engine instance
Returns
string The compiled block

Reimplemented from tplNodeBlock.

Field Documentation

◆ $stack

$stack = []
staticprotected

Referenced by getStackBlock().

◆ $current_block

$current_block = null
staticprotected

◆ $name

$name
protected

Referenced by getStackBlock(), and setClosing().


The documentation for this class was generated from the following file: