Class: HtmlCell
- Package: saf.GUI
- Author: John Luxford <lux@simian.ca>
- Copyright: Copyright (C) 2001-2003, Simian Systems Inc.
- License: http://www.sitellite.org/index/license Simian Open Software License
- Version: 1.0, 2002-08-17, $Id: Cell.php,v 1.3 2007/10/06 00:06:30 lux Exp $
- Access: public
HtmlCell is the individual cell class for the HtmlLayout grid class.
Note: In addition to requiring the HtmlLayout class to really do anything
useful, HtmlCell also requires a global saf.Template.Simple object called $simple
be defined.
Usage Example
<?php
$cell = new HtmlCell ('some_template.spt');
$cell->set ('border', '2');
echo $cell->render ($fill_object);
?>
Return to Top
Properties
$template
Contains the template to use to fill this cell with upon calling render().
$fill
The object or associative array to use to fill the template with upon
calling render().
$span
The span of this cell. Set to -1 and the cell will disappear. Use
$this->attrs['colspan'] or ['rowspan'] to set these properties in the
corresponding HTML <td> tag.
$attrs = array ()
Contains all HTML <td> properties for the current object.
$default
$default is an optional default value to place in cells whose
templates result in no output.
Return to Top
Methods
HtmlCell ($template = '')
Constructor method.
set ($property, $value)
Sets the appropriate key/value pair in $attrs.
render ($object = '', $properties = array (), $default = ' ')
- Access: public
- Return: string
Renders this cell into an HTML <td> tag filled with
the output of the specified template. $object may replace the $fill
property if specified. $properties is a list of properties of the
<td> tag, and $default is an optional default value to place
in cells whose templates result in no output.
Return to Top