TemplatedFullBlock Class Reference
A block that renders itself only from a template and can be passed parameters. More...
Inheritance diagram for
TemplatedFullBlock:
Public Member Functions |
|
__construct ($template, $params=array(), $index=1000, $position=self::LEFT) | |
Constructor. |
Detailed Description
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');
Definition at line 24 of file templated.full.block.cls.php.
Constructor & Destructor Documentation
TemplatedFullBlock::__construct | ( | $ | template, | |
$ | params = array() , |
|||
$ | index = 1000 , |
|||
$ | position =
self::LEFT |
|||
) |
Constructor.
- Parameters:
-
string $template The template to render array $params Assoziative array that gets passed to the view integer $index The block's index. A block with lowest index will be displayed first enum $position Where the block is to be displayed.
Definition at line 33 of file templated.full.block.cls.php.
00033 { 00034 parent::__construct(String::plain_ascii($template, '-'), '', $template, $params, $index, $position); 00035 }
The documentation for this class was generated from the following file:
- contributions/page.blocks/controller/base/templated.full.block.cls.php