Table row class

This class provides the most basic object : - it has a name - and an encoding

category Table
package Formaid
author Dieter Adriaenssens
copyright 2006-2013 Dieter Adriaenssens
license GPL
link http://formaid.sourceforge.net/
todo inherit from Formaid_RecordForm, but check TableHeader before doing so

 Methods

Constructor, initialises an instance of Formaid_TableRow

__construct(string $name, array $data, string $class, bool $format_htmlentities) : void

Sets encoding to be used, and set name of the object

Parameters

$name

string

Name of the tablerow

$data

array

Array with tablerow data

$class

string

Html class (used for layout)

$format_htmlentities

bool

Escape html output

Add data to a tablerow

addData(mixed $data) : void

Parameters

$data

mixed

array or single value is added

Disables trimming whitespace of object name

disableTrimName() : void
Inherited
inherited_from \Formaid_Object::disableTrimName()

Display object

display() : void
Inherited

The name of the object is printed to stdout.

inherited_from \Formaid_Object::display()

Enables trimming whitespace of object name

enableTrimName() : void
Inherited
inherited_from \Formaid_Object::enableTrimName()

Generates a the HTML code for a table row.

getDisplayString() : string

Returns

string

Returns name of the object

getName() : string
Inherited
inherited_from \Formaid_Object::getName()

Returns

stringobject name

Checks if object name is empty

isNameEmpty() : bool
Inherited
inherited_from \Formaid_Object::isNameEmpty()

Returns

booltrue if empty

Sets new name for the object

setName(string $new_name) : void
Inherited
inherited_from \Formaid_Object::setName()

Parameters

$new_name

string

new name

Show object

show() : void
Inherited

The name of the object is printed to stdout.

inherited_from \Formaid_Object::show()

Checks if deleting the table row is allowed.

allowDelete() : bool

If the Privilege on this table row (allow_delete) is set, it is allowed to delete the table row.

Returns

booltrue if deleting is allowed.

Checks if displaying the table row is allowed.

allowShow() : bool

If the Privilege on this table row (allow_show) is set, it is allowed to display the tablerow.

Returns

booltrue if displaying is allowed.

Checks if modifying the table row is allowed.

allowUpdate() : bool

If the Privilege on this table row (allow_update) is set, it is allowed to modify the table row.

Returns

booltrue if modifying is allowed.

Returns name formatted for displaying

getDisplayName() : string
Inherited
inherited_from \Formaid_Object::getDisplayName()

Returns

stringformatted object name

 Properties

 

$ID : string
access public
 

$class : string
access public
 

$filename : string
access public
 

$format_htmlentities : bool
access public
 

$privileges : array
access public
 

$row_fields : object
access public
 

$encoding : string
Inherited
access protected
inherited_from \Formaid_Object::$$encoding
 

$field_code : string
access protected
 

$item_code : string
access protected
 

$name : string
Inherited
access protected
inherited_from \Formaid_Object::$$name
 

$_trimName : bool
Inherited
access private
inherited_from \Formaid_Object::$$_trimName