.

TemplatedParameterizedBlock Class Reference

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

Inheritance diagram for TemplatedParameterizedBlock:
TemplatedBlock BlockBase IBlock IRenderer TemplatedFullBlock TemplatedSimpleBlock

List of all members.

Public Member Functions

  __construct ($name, $title, $template, $params, $index=1000, $position=self::LEFT)
  Constructor.

Protected Member Functions

  configure_view ($view)
  Configure the view.

Protected Attributes

  $params = array()

Detailed Description

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

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 16 of file templated.parameterized.block.cls.php.


Constructor & Destructor Documentation

TemplatedParameterizedBlock::__construct ( name,
title,
template,
params,
index = 1000,
position = self::LEFT  
)

Constructor.

Parameters:
string  $name The name of this block. Used as class, too
string  $title The title of the block. Displayed as heading, e.g.
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 29 of file templated.parameterized.block.cls.php.

00029                                                                                                             {
00030                 $this->params = $params;
00031                 parent::__construct($name, $title, $template, $index, $position);
00032         }

Member Function Documentation

TemplatedParameterizedBlock::configure_view ( view  )  [protected]

Configure the view.

Parameters:
IView  $view

Reimplemented from TemplatedBlock.

Definition at line 39 of file templated.parameterized.block.cls.php.

00039                                                  {
00040                 $view->assign_array($this->params);
00041         }

Member Data Documentation

TemplatedParameterizedBlock::$params = array() [protected]

Definition at line 17 of file templated.parameterized.block.cls.php.


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