Class tablecell

Description

tablecell

This class encapsulates a single cell of a table. As such is is a receptacle of content which can be styled. The cell can also optionally have permissions defined for it. If defined the rendering as HTML will check the logged-in user groups form permission to update content. If permission exists, then the content is rendered as a form text field instead. The cell variable "cellid" should have been set before this, so that the form field is named.

Located in /html-defs.php (line 612)

RenderableObject
   |
   --StylableObject
      |
      --HTMLObject
         |
         --tablecell
Variable Summary
 mixed $access
 mixed $cellid
 mixed $colspan
 mixed $colspanned
 mixed $content
 mixed $heading
 mixed $nbsp
 mixed $rowspan
 mixed $rowspanned
Method Summary
 tablecell tablecell ([mixed $content = ""], [mixed $css = ""])
 void addcontent ([mixed $text = ""])
 void autojustify ()
 void clearcontent ()
 void csv ()
 void html ()
 void permit (integer $agentids, integer $perm, [string $cellid = "???"])
 void setalignment ([mixed $align = ""], [mixed $valign = ""])
 void setcellid (mixed $cellid)
 void setcolspan (mixed $span)
 void setcontent ([mixed $text = ""])
 void setcontentcss ([mixed $css = ""])
 void setmetrics ([mixed $width = ""], [mixed $height = ""])
 void setrowspan (mixed $span)
 void span (mixed $type)
 void unpermit (integer $agentids, integer $perm)
 void unspan (mixed $type)
Variables
mixed $access (line 630)

Optional access permissions for cell.

mixed $cellid = "" (line 614)

Optional unique ID for this cell. Used for form field naming.

mixed $colspan = 1 (line 616)

Column span that this cell is anchor of

mixed $colspanned = false (line 624)

Whether this cell is colspanned (invisible)

mixed $content (line 622)

The cell content object

mixed $heading = false (line 620)

Whether this is a heading cell

mixed $nbsp = false (line 628)

Force blank content to be non-blank space

mixed $rowspan = 1 (line 618)

Row span that this cell is anchor of

mixed $rowspanned = false (line 626)

Whether this cell is rowspanned (invisible)

Inherited Variables

Inherited from HTMLObject

HTMLObject::$accesskey
HTMLObject::$align
HTMLObject::$alt
HTMLObject::$bgcolor
HTMLObject::$bgurl
HTMLObject::$border
HTMLObject::$color
HTMLObject::$height
HTMLObject::$hspace
HTMLObject::$lang
HTMLObject::$langdir
HTMLObject::$linkover_text
HTMLObject::$name
HTMLObject::$onblur
HTMLObject::$onchange
HTMLObject::$onclick
HTMLObject::$ondblclick
HTMLObject::$onfocus
HTMLObject::$onkeydown
HTMLObject::$onkeypress
HTMLObject::$onkeyup
HTMLObject::$onload
HTMLObject::$onmousedown
HTMLObject::$onmousemove
HTMLObject::$onmouseout
HTMLObject::$onmouseover
HTMLObject::$onmouseup
HTMLObject::$onselect
HTMLObject::$size
HTMLObject::$src
HTMLObject::$tabindex
HTMLObject::$target
HTMLObject::$title
HTMLObject::$user_attributes
HTMLObject::$valign
HTMLObject::$vspace
HTMLObject::$width

Inherited from StylableObject

StylableObject::$class
StylableObject::$id
StylableObject::$style
Methods
Constructor tablecell (line 633)

Constructor. Create this new table cell object.

tablecell tablecell ([mixed $content = ""], [mixed $css = ""])
addcontent (line 729)

Add to the content for this cell

void addcontent ([mixed $text = ""])
autojustify (line 739)

Automatically set the alignment of this cell according to content.

void autojustify ()
clearcontent (line 734)

Clear the content from this cell.

void clearcontent ()
csv (line 804)

Return the CSV content for this cell.

void csv ()
html (line 773)

Return the HTML for this cell. Cell content can be displayed as either standard text, or as a form-field. The latter case is only possible if the cell has had permissions defined, and the logged-in user is found to be permitted UPDATE access to the cell.

void html ()

Redefinition of:
RenderableObject::html()
Return output suitable for normal HTML-capable device. This method must be over-ridden by a method of the same name in the descendant class which renders output to web browsers.
permit (line 644)

Set permission for this cell for given agent

void permit (integer $agentids, integer $perm, [string $cellid = "???"])
  • integer $agentids: List of unique IDs of agents to assign the permission for
  • integer $perm: The permission or combination of perms to assign
  • string $cellid: Identity of the cell, used for rendering cell as textfield in a form
setalignment (line 756)

Set the alignment of this cell

void setalignment ([mixed $align = ""], [mixed $valign = ""])
setcellid (line 666)

Set the cell ID

void setcellid (mixed $cellid)
setcolspan (line 671)

Set the number of columns this cell spans

void setcolspan (mixed $span)
setcontent (line 724)

Set the content for this cell

void setcontent ([mixed $text = ""])
setcontentcss (line 719)

Set the style or class for the content of this cell

void setcontentcss ([mixed $css = ""])
setmetrics (line 762)

Set the width and height of this cell

void setmetrics ([mixed $width = ""], [mixed $height = ""])
setrowspan (line 684)

Set the number of rows this cell spans

void setrowspan (mixed $span)
span (line 692)

Flag this cell as being spanned

void span (mixed $type)
unpermit (line 659)

Unset permission for this cell for given agent

void unpermit (integer $agentids, integer $perm)
  • integer $agentids: List of unique IDs of agents to unassign the permission from
  • integer $perm: The permission or combination of perms to unassign
unspan (line 709)

Flag this cell as being unspanned

void unspan (mixed $type)

Inherited Methods

Inherited From HTMLObject

 HTMLObject::HTMLObject()
 HTMLObject::inherit_attributes()
 HTMLObject::setaccesskey()
 HTMLObject::setalign()
 HTMLObject::setalt()
 HTMLObject::setbackground()
 HTMLObject::setbgcolor()
 HTMLObject::setborder()
 HTMLObject::setcolor()
 HTMLObject::setheight()
 HTMLObject::sethspace()
 HTMLObject::setlang()
 HTMLObject::setlangdir()
 HTMLObject::setname()
 HTMLObject::setsize()
 HTMLObject::setsrc()
 HTMLObject::settabindex()
 HTMLObject::settarget()
 HTMLObject::settitle()
 HTMLObject::setvalign()
 HTMLObject::setvspace()
 HTMLObject::setwidth()
 HTMLObject::set_attribute()
 HTMLObject::set_linkover_text()
 HTMLObject::set_onblur()
 HTMLObject::set_onchange()
 HTMLObject::set_onclick()
 HTMLObject::set_ondblclick()
 HTMLObject::set_onfocus()
 HTMLObject::set_onkeydown()
 HTMLObject::set_onkeypress()
 HTMLObject::set_onkeyup()
 HTMLObject::set_onload()
 HTMLObject::set_onmousedown()
 HTMLObject::set_onmousemove()
 HTMLObject::set_onmouseout()
 HTMLObject::set_onmouseover()
 HTMLObject::set_onmouseup()
 HTMLObject::set_onselect()
 HTMLObject::set_tabindex()
 HTMLObject::taghtml()

Inherited From StylableObject

 StylableObject::StylableObject()
 StylableObject::clearstyle()
 StylableObject::setclass()
 StylableObject::setcss()
 StylableObject::setid()
 StylableObject::setstyle()

Inherited From RenderableObject

 RenderableObject::RenderableObject()
 RenderableObject::html()
 RenderableObject::render()
 RenderableObject::wml()
 RenderableObject::wmlup()
 RenderableObject::xml()

Documentation generated by phpDocumentor 1.3.0RC3