Class AnchorTableList

Description

Anchor list similar to AnchorList, but this time in a table not dot points

Located in /inc/formslib/anchortablelist.php (line 30)

Field
   |
   --ChoiceList
      |
      --AnchorList
         |
         --AnchorTableList
Variable Summary
string $aclass
array $data
boolean $linkAll
integer $numcols
string $sortbyKey
string $tableclass
string $tdlclass
string $tdrclass
string $trclass
Method Summary
AnchorTableList AnchorTableList (string $name, [string $description = ''], [integer $numcols = 2])
void connectDB ( $table, [ $fields = ''], [ $restriction = ''], [ $order = 'name'], [ $idfield = 'id'], [ $limit = ''], [ $join = ''], [ $distinct = false])
void display ()
void format ( $data)
void setTableHeadings (array $headings)
void sortByHeadings (boolean $sort, array $data, [string $heading = 'name'])
Variables
string $aclass = 'itemR' (line 42)
  • var: html/css class for anchors

Redefinition of:
AnchorList::$aclass
array $data = null (line 55)
  • var: data source from which the column to sort by will be read
string $defaultSortByHeading = 'name' (line 53)
  • var: tells which header to sort by. null for default. This value will be superseeded by the sortby paramater in connectDB
string $headerRowClass = 'tableHeader' (line 34)
  • var: html/css class for the header row of the table
boolean $linkAll = true (line 48)
  • var: make all columns in the table link to the target URL not just the first
integer $numcols = '' (line 32)
  • var: number of columns in the table
string $sortbyKey (line 57)
  • var: key in $data in which the column name should be stored
string $tableclass = 'selectlist' (line 44)
  • var: html/css class for entire table
array $tableHeading (line 46)
  • var: list of table headings to be put at the top of the table
string $tdlclass = 'itemL' (line 38)
  • var: html/css class for left-side table cell
string $tdrclass = 'itemR' (line 40)
  • var: html/css class for right-side table cell
string $trclass = 'itemrow' (line 36)
  • var: html/css class for each row in the table
boolean $useSortByHeadings = false (line 50)
  • var: controls the generation of header links to sort the table by

Inherited Variables

Inherited from AnchorList

AnchorList::$hrefbase
AnchorList::$liclass
AnchorList::$ulclass

Inherited from ChoiceList

ChoiceList::$deleted
ChoiceList::$extendable
ChoiceList::$formatid
ChoiceList::$formatter
ChoiceList::$list

Inherited from Field

Field::$attr
Field::$changed
Field::$DEBUG
Field::$defaultValue
Field::$description
Field::$duplicateName
Field::$editable
Field::$errorclass
Field::$hidden
Field::$isValid
Field::$isValidTest
Field::$longname
Field::$name
Field::$namebase
Field::$notifyIdChange
Field::$oob_errorMessage
Field::$oob_status
Field::$ovalue
Field::$required
Field::$requiredTwoStage
Field::$sqlHidden
Field::$suppressValidation
Field::$useNullValues
Field::$value
Field::$valueCleaner
Methods
Constructor AnchorTableList (line 66)

Create a new AnchorTableList

AnchorTableList AnchorTableList (string $name, [string $description = ''], [integer $numcols = 2])
  • string $name: the name of the field (db name, and html field name
  • string $description: used in the html title of the list
  • integer $numcols: (optional) number of columns in the table
connectDB (line 179)

overloading of ChoiceList's connectDB to allow for remembering the

sortby column

void connectDB ( $table, [ $fields = ''], [ $restriction = ''], [ $order = 'name'], [ $idfield = 'id'], [ $limit = ''], [ $join = ''], [ $distinct = false])
  • $table
  • $fields
  • $restriction
  • $order
  • $idfield
  • $limit
  • $join
  • $distinct

Redefinition of:
ChoiceList::connectDB()
Create a DBList object within this class that is connected to the available choices in the database and will handle the actual parsing of user input etc
display (line 127)
void display ()

Redefinition of:
AnchorList::display()
create the html list
format (line 97)
void format ( $data)
  • $data

Redefinition of:
AnchorList::format()
format an individual element in the list
setTableHeadings (line 77)

Accessor method to set the table column headings

void setTableHeadings (array $headings)
  • array $headings: new headings to use for the table
sortByHeadings (line 91)

Sets which heading to sort by

void sortByHeadings (boolean $sort, array $data, [string $heading = 'name'])
  • boolean $sort: turn the sort by links on and off
  • array $data: data source to find which heading to sort by
  • string $heading: (optional) the default heading to sort by

Inherited Methods

Inherited From AnchorList

AnchorList::AnchorList()
AnchorList::display()
AnchorList::format()

Inherited From ChoiceList

ChoiceList::ChoiceList()
ChoiceList::append()
ChoiceList::connectDB()
ChoiceList::display()
ChoiceList::displayInTable()
ChoiceList::format()
ChoiceList::getValue()
ChoiceList::isValid()
ChoiceList::prepend()
ChoiceList::selectedValue()
ChoiceList::set()
ChoiceList::setDefault()
ChoiceList::setFormat()
ChoiceList::setValuesArray()
ChoiceList::sqlSetStr()
ChoiceList::text_dump()
ChoiceList::update()
ChoiceList::__clone()

Inherited From Field

Field::Field()
Field::display()
Field::displayInTable()
Field::getValue()
Field::hidden()
Field::isValid()
Field::log()
Field::selectable()
Field::selectedValue()
Field::set()
Field::setattr()
Field::setEditable()
Field::setNamebase()
Field::sqlSetStr()
Field::text_dump()
Field::update()
Field::__clone()

Documentation generated on Tue, 06 Mar 2007 10:00:32 +0000 by phpDocumentor 1.3.0