Structures_DataGrid
[ class tree: Structures_DataGrid ] [ index: Structures_DataGrid ] [ all elements ]

Class: Structures_DataGrid_Column

Source Location: /Structures_DataGrid-0.5.1/DataGrid/Column.php

Class Overview


Structures_DataGrid_Column Class


Author(s):

Version:

  • $Revision: 1.5 $

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 32]
Structures_DataGrid_Column Class

This class represents a single column for the DataGrid.



[ Top ]


Class Variables

$attribs =

[line 56]

The attributes of the td tag. Optional

Type:   array


[ Top ]

$autoFill =

[line 62]

Determine whether or not to use fill in empty cells

Type:   boolean


[ Top ]

$autoFillValue =

[line 68]

The value to be used if a cell contains a null value

Type:   array


[ Top ]

$columnName =

[line 38]

The name of the column

Type:   array


[ Top ]

$fieldName =

[line 44]

The name of the field to map to

Type:   array


[ Top ]

$formatter =

[line 74]

A function to be called for each cell to modify the output

Type:   array


[ Top ]

$orderBy =

[line 50]

The field name to order by. Optional

Type:   array


[ Top ]



Method Detail

Structures_DataGrid_Column (Constructor)   [line 91]

Structures_DataGrid_Column Structures_DataGrid_Column( string $columnName, [string $fieldName = null], [string $orderBy = null], [string $attribs = array()], [boolean $autoFill = null], [string $autoFillValue = null], [string $formatter = null])

Constructor

Creates default table style settings

  • Access: public

Parameters:

string   $columnName   —  The name of the column to br printed
string   $fieldName   —  The name of the field for the column to be mapped to
string   $orderBy   —  Whether or not to use the autoFill
string   $attribs   —  Whether or not to use the autoFill
boolean   $autoFill   —  Whether or not to use the autoFill
string   $autoFillValue   —  Whether or not to use the autoFill
string   $formatter   —  Whether or not to use the autoFill

[ Top ]

formatter   [line 158]

void formatter( $record)

Formatter

Calls a predefined function to develop custom output for the column. It can accepts paramaters so that each cell in the column can be unique based on the record.

  • Todo: This method needs to be intuituve and more flexible, possibly a seperate column object?
  • Access: public

Parameters:

   $record   — 

[ Top ]

setAutoFill   [line 113]

void setAutoFill( boolean $bool)

Set Auto Fill

Defines a value to be printed if a cell in the column is null.

  • Access: public

Parameters:

boolean   $bool   —  Whether or not to use the autoFill

[ Top ]

setAutoFillValue   [line 130]

void setAutoFillValue( string $str)

Set Auto Fill Value

Defines a value to be printed if a cell in the column is null.

  • Access: public

Parameters:

string   $str   —  The value to use for the autoFill

[ Top ]

setFormatter   [line 142]

void setFormatter( $str)

Set Formatter

Defines the function and paramters to be called by the formatter method.

  • Access: public

Parameters:

   $str   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:52:07 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.