contributions/page.blocks/controller/base/templated.simple.block.cls.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * A block that renders itself only from a template and can be passed parameters. 00004 * 00005 * The blocks name is by default taken from the template: Its the templates file name, 00006 * converted to plain ascii. E.g. for a template "news/blocks/teaser", the name would be 00007 * "news-blocks-teaser". 00008 * 00009 * Block title by default is empty and must be set through template. 00010 * 00011 * The block instance is available as $block within the template. So you may change title or 00012 * name like this: 00013 * 00014 * @code 00015 * $$block->set_title('New title'); 00016 * $block->set_name('newname'); 00017 * @endcode 00018 * 00019 * @ingroup Blocks 00020 * @author Gerd Riesselmann 00021 */ 00022 class TemplatedSimpleBlock extends TemplatedFullBlock { 00023 /** 00024 * Constructor 00025 * 00026 * @param string $template The template to render 00027 * @param integer $index The block's index. A block with lowest index will be displayed first 00028 * @param enum $position Where the block is to be displayed. 00029 */ 00030 public function __construct($template, $index = 1000, $position = self::LEFT) { 00031 parent::__construct($template, array(), $index, $position); 00032 } 00033 00034 }