\Pluf_Template_Tag_Mytag

Custom tag example.

با استفاده از برچسب می‌توان داده‌های مورد نیاز و یا الگوهای مورد نیاز در لایه الگو را ایجاد کرد.

Summary

Methods
Properties
Constants
__construct()
start()
genStart()
end()
genEnd()
No public properties found
No constants found
No protected methods found
$context
N/A
No private methods found
No private properties found
N/A

Properties

$context

$context : array

Type

array

Methods

__construct()

__construct(  $context = null) 

Constructor.

Parameters

$context

start()

start(  $param1,   $param2) 

Perform some operations at the opening of the tag {mytag 'param1', 'param2'}.

You can access the template context through $this->context

Parameters

$param1
$param2

genStart()

genStart() 

Generate some valid PHP code to be put in the template.

The code generated by this function is included in the template just after the call to $this->start() if the start() method is implemented.

You cannot access the template context but you can write code that is modifying it through $t

end()

end(  $param1) 

Perform some operations at the closing of the tag {/mytag 'param1'}.

You can access the template context through $this->context

Parameters

$param1

genEnd()

genEnd() 

Generate some valid PHP code to be put in the template.

The code generated by this function is included in the template just after the call to $this->end() if the end() method is implemented.

You cannot access the template context but you can write code that is modifying it through $t