TemplatedSimpleBlock Class Reference
A block that renders itself only from a template and can be passed parameters. More...
Public Member Functions
|__construct ($template, $index=1000, $position=self::LEFT)|
A block that renders itself only from a template and can be passed parameters.
The blocks name is by default taken from the template: Its the templates file name, converted to plain ascii. E.g. for a template "news/blocks/teaser", the name would be "news-blocks-teaser".
Block title by default is empty and must be set through template.
The block instance is available as $block within the template. So you may change title or name like this:
$$block->set_title('New title'); $block->set_name('newname');
Constructor & Destructor Documentation
string $template The template to render integer $index The block's index. A block with lowest index will be displayed first enum $position Where the block is to be displayed.
The documentation for this class was generated from the following file: