.

TemplatedSimpleBlock Class Reference

A block that renders itself only from a template and can be passed parameters. More...

Inheritance diagram for TemplatedSimpleBlock:
TemplatedFullBlock TemplatedParameterizedBlock TemplatedBlock BlockBase IBlock IRenderer

List of all members.

Public Member Functions

  __construct ($template, $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');
Author:
Gerd Riesselmann

Definition at line 22 of file templated.simple.block.cls.php.


Constructor & Destructor Documentation

TemplatedSimpleBlock::__construct ( template,
index = 1000,
position = self::LEFT  
)

Constructor.

Parameters:
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.

Definition at line 30 of file templated.simple.block.cls.php.

00030                                                                                     {
00031                 parent::__construct($template, array(), $index, $position);
00032         }

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