Skip to content

Smarty_Internal_Block

Smarty {block} tag class

  • Full name: \Smarty_Internal_Block

Properties

name

Block name

public string $name

hide

Hide attribute

public bool $hide

append

Append attribute

public bool $append

prepend

prepend attribute

public bool $prepend

callsChild

Block calls $smarty.block.child

public bool $callsChild

child

Inheritance child block

public \Smarty_Internal_Block|null $child

parent

Inheritance calling parent block

public \Smarty_Internal_Block|null $parent

tplIndex

Inheritance Template index

public int $tplIndex

Methods

__construct

Smarty_Internal_Block constructor.

public __construct(string $name, int|null $tplIndex): mixed
  • if outer level {block} of child template ($state === 1) save it as child root block
  • otherwise process inheritance and render

Parameters:

Parameter Type Description
$name string block name
$tplIndex int|null index of outer level {block} if nested

callBlock

Compiled block code overloaded by {block} class

public callBlock(\Smarty_Internal_Template $tpl): mixed

Parameters:

Parameter Type Description
$tpl \Smarty_Internal_Template


Automatically generated on 2025-03-18