FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Table Class Reference
Inheritance diagram for Table:
Char Widget Thing Lookup

Public Member Functions

 columnCaption ($column)
 
 sessionKey ($key)
 
 clientConfig ()
 
 convert ($value)
 
 clientConvert ($value)
 
 format ($value)
 
 clientFormat ($value)
 
 searchParams (&$search, &$order)
 
- Public Member Functions inherited from Char
 clientConfig ()
 
 formatTag ($value)
 
- Public Member Functions inherited from Widget
 __construct ($config=null)
 
 update ($config)
 Update the widget configuration. More...
 
 clientConfig ()
 Public configuration. More...
 
 caption ($id=null)
 
 hint ($id=null)
 
 convert ($value)
 Convert a value from user format to standard, internal format. More...
 
 clientConvert ($value)
 Convert a value from client format to standard, internal format. More...
 
 dataConvert ($value)
 Convert an internal value before it is stored in the request data. More...
 
 format ($value)
 Format a value from standard, internal format to user format. More...
 
 clientFormat ($value)
 Format a value from standard, internal format to client format. More...
 
 formatTag ($value)
 Format a tag value. More...
 
 purge ($value)
 Purge a value. More...
 
 expect ($action)
 Note if an action is expected. More...
 
 execute ()
 Execute an action on this widget. More...
 
 nothing ($value)
 Check if a value is empty. More...
 
 check ($value, $index=null)
 Check a value. More...
 
- Public Member Functions inherited from Thing
 propertyExists ($property)
 Check if a property exists (public or published). More...
 
 constants ($prefix=null)
 Return all constants. More...
 
 get ($key)
 Get one or more properties. More...
 
 set ($key, $value=null)
 Set one or more properties. More...
 
 __get ($key)
 
 __set ($key, $value)
 

Data Fields

const PROVIDER = 'provider'
 Data provider. More...
 
const KEY = 'key'
 System key (hidden from user). More...
 
const SEQUENCE = 'sequence'
 Sequence key (higher = newer). More...
 
const CODE = 'code'
 User code (what the user sees; default same as key). More...
 
const DESCR = 'descr'
 Full description. More...
 
const PARENT_KEY = 'parentKey'
 Parent key column. More...
 
const COLUMNS = 'columns'
 Grid columns (key = column name, value = column config; code and description if empty). More...
 
const LINK = 'link'
 Link (URL) for a record ("[columnName]" is replaced by the value of that column, for that record). More...
 
const BATCH_SIZE = 'batchSize'
 Number of records to return per call. More...
 
const DOWNLOAD_FORMATS = 'downloadFormats'
 Available download formats (key = description, value = function (use '*' to. More...
 
const DOWNLOAD_NAME = 'downloadName'
 Filename (without extension) used for download. More...
 
const ORDER = 'order'
 True if ordering the result by this column is allowed (default true if omitted). More...
 
const SEARCH = 'search'
 Allowed search methods for this column (see \Rsi\Fred\Controller\Provider::SEARCH_*. More...
 
const TOTAL = 'total'
 Show total for this column (see \Rsi\Fred\Controller\Provider::TOTAL_* constants; one or. More...
 
const GROUP = 'group'
 Show grouped data for this column (array with keys 'group' = column to group by - defaults to. More...
 
const FORMAT = 'format'
 Formatting method. More...
 
const FORMAT_PARAMS = 'formatParams'
 Extra parameters for the formatting method. More...
 
const VISIBLE = 'visible'
 Default visibility (see VISIBLE_* and DOWNLOAD_* constants). More...
 
const VISIBLE_DEFAULT = 1
 Show by deault (may be unselected by the user). More...
 
const VISIBLE_OPTIONAL = 2
 Dont't show by default, but make it selectable for the user. More...
 
const VISIBLE_NEVER = 4
 Do not show (also not optional). More...
 
const DOWNLOAD_DEFAULT = 16
 Download by default (may be unselected by the user). More...
 
const DOWNLOAD_VISIBLE = 32
 Download when visible. More...
 
const DOWNLOAD_OPTIONAL = 64
 Do not download by default, but make it selectable for the user. More...
 
 $provider = null
 
 $batchSize = 100
 
 $link = null
 
 $sequence = null
 
 $sequenceMessage = '{[count<0]!}{[count>0]{[count|number()]}}'
 Message for new records (available tags: count,. More...
 
 $pdfWriter = null
 
 $downloadName = 'data'
 
 $downloadCookieKey = 'fred-controller-table-downloading'
 
 $downloadBusyMessage = null
 
 $downloadTimeout = null
 
- Data Fields inherited from Char
const SIZE = 'size'
 Size of field. More...
 
const PLACEHOLDER = 'placeholder'
 
const SUGGEST = 'suggest'
 Suggestion optiones. This can be an assoc.array, a callback function (called with all extra. More...
 
const NOTATION = 'notation'
 Regular expression describing the prefered notation style (e.g. '/^[A-z]/' = start with a. More...
 
const TRANSFORM = 'transform'
 Transform the value (see \Rsi\Str::TRANSFORM_* constants). More...
 
const TRIM = 'trim'
 Strip these characters from the beginning and end of the value (true for regular whitespace). More...
 
const REGEX = 'regex'
 
 $regex = null
 
 $size = null
 
 $placeholder = null
 
 $suggest = null
 
 $suggestLimit = 10
 
 $notation = null
 
 $transform = null
 
 $trim = null
 
- Data Fields inherited from Widget
const CHILD_ID_SEPARATOR = '__'
 
const CAPTION = 'caption'
 
const DEFAULT_VALUE = 'defaultValue'
 
const DISPLAY = 'display'
 Display type (see DISPLAY_* constants). More...
 
const HELP = 'help'
 Help string (translated). More...
 
const HINT = 'hint'
 Hint string (translated). More...
 
const PARAMS = 'params'
 Extra parameters (prefix the key with a '@' to point to the value of another widget). More...
 
const RIGHT = 'right'
 Optional different right with respect to the controller. If the user has the right, then (s)he. More...
 
const TRAILER = 'trailer'
 Trailer string (translated). More...
 
const TAGS = 'tags'
 Extra tags for help, hint, and trailer. More...
 
const WIDGET_HELP = 'widgetHelp'
 General widget help (translated). More...
 
const CLASS_NAME = 'className'
 
const MIN = 'min'
 Minimum value. More...
 
const MAX = 'max'
 Maximum value. More...
 
const REQUIRED = 'required'
 True for required. Set to self::VALID_FUNC to let the validation function handle this. Use. More...
 
const VALID_FUNC = 'validFunc'
 Specific validation function (called with value and index; returns true if OK). More...
 
const WIDGETS = 'widgets'
 Optional child widgets (key = name, value = widget object). More...
 
const SECURITY_CHECKS_IGNORE = 'securityChecksIgnore'
 Security checks to ignore (array with checks to ignore, true =. More...
 
const DISPLAY_HIDDEN = 'h'
 Do not show (only hidden) More...
 
const DISPLAY_MINIMAL = 'm'
 Show only value (without input element(s)). More...
 
const DISPLAY_READABLE = 'r'
 Show input element(s), but read-only. More...
 
const DISPLAY_WRITEABLE = 'w'
 Show editable input element(s). More...
 
const EVENT_ACTION_PREFIX = 'controller:widget:action:'
 
 $defaultValue = null
 
 $help = null
 
 $min = null
 
 $max = null
 
 $required = null
 
 $trailer = null
 
 $widgetHelp = null
 
 $validFunc = null
 
 $parent = null
 Optional parent widget. More...
 
- Data Fields inherited from Thing
const HIDDEN = 0
 Property is hidden. More...
 
const READABLE = 1
 Property is readable. More...
 
const WRITEABLE = 2
 Property is writeable. More...
 
const READWRITE = 3
 Property is readable and writeable. More...
 

Protected Member Functions

 init ()
 
 checkRange ($value, $index=null)
 
 download ($records, $format, $ext=null, $content_type=null)
 
 downloadExcel ($records)
 
 downloadXLSX ($records)
 
 downloadCSV ($records)
 
 downloadPDF ($records)
 
 downloadXML ($records)
 
 downloadJSON ($records)
 
 actionRecords ()
 
 actionTotals ()
 
 actionGroup ()
 
 actionDownload ()
 
 actionNew ()
 
 getCode ()
 
 getColumns ()
 
 getDownloadFormats ()
 
- Protected Member Functions inherited from Char
 purgeBase ($value)
 
 purgeTransform ($value)
 
 purgeTrim ($value)
 
 checkMin ($value, $index=null)
 
 checkMax ($value, $index=null)
 
 checkRegex ($value, $index=null)
 
 actionSuggest ()
 
 getParams ()
 
- Protected Member Functions inherited from Widget
 init ()
 
 config ($key, $default=null)
 Get single configuration value. More...
 
 purgeBase ($value)
 Purge function that will be called first. More...
 
 executeChild ($id)
 Execute an action on a child widget. More...
 
 checkMin ($value, $index=null)
 
 checkMax ($value, $index=null)
 
 checkRequired ($value, $index=null)
 Required check. More...
 
 checkValidFunc ($value, $index=null)
 
 actionHelp ()
 
 setController ($value)
 
 getDisplay ()
 
 getFred ()
 
 getId ()
 
 getParams ()
 
 getReadable ()
 
 getRight ()
 
 getTags ()
 
 getWidgets ()
 
 getWriteable ()
 
 _get ($key)
 
- Protected Member Functions inherited from Thing
 publish ($property, $visibility=self::READABLE)
 Publish a property (or hide it again). More...
 
 configure ($config)
 Configure the object. More...
 
 _get ($key)
 Default getter if no specific setter is defined, and the property is also not published (readable). More...
 
 _set ($key, $value)
 Default setter if no specific setter is defined, and the property is also not published (writeable). More...
 

Protected Attributes

 $_key = null
 
 $_code = null
 
 $_descr = null
 
 $_parentKey = null
 
 $_search = null
 
 $_columns = null
 
 $_downloadFormats = null
 
- Protected Attributes inherited from Widget
 $_controller = null
 
 $_id = null
 
 $_widgets = null
 Optional child widgets. More...
 
 $_securityChecksIgnore = []
 Security checks to ignore. More...
 
 $_config = []
 Widget configuration (see constants). More...
 
 $_display = null
 
 $_params = null
 
 $_right = null
 
 $_tags = null
 
- Protected Attributes inherited from Thing
 $_published = []
 Published properties (key = name of property, value = visibility). More...
 

Detailed Description

Definition at line 8 of file Table.php.

Member Function Documentation

◆ actionDownload()

actionDownload ( )
protected

Definition at line 224 of file Table.php.

◆ actionGroup()

actionGroup ( )
protected

Definition at line 211 of file Table.php.

◆ actionNew()

actionNew ( )
protected

Definition at line 233 of file Table.php.

◆ actionRecords()

actionRecords ( )
protected

Definition at line 181 of file Table.php.

◆ actionTotals()

actionTotals ( )
protected

Definition at line 198 of file Table.php.

◆ checkRange()

checkRange (   $value,
  $index = null 
)
protected

Definition at line 112 of file Table.php.

◆ clientConfig()

clientConfig ( )

Definition at line 79 of file Table.php.

◆ clientConvert()

clientConvert (   $value)

Definition at line 100 of file Table.php.

◆ clientFormat()

clientFormat (   $value)

Definition at line 108 of file Table.php.

◆ columnCaption()

columnCaption (   $column)

Definition at line 69 of file Table.php.

◆ convert()

convert (   $value)

Definition at line 96 of file Table.php.

◆ download()

download (   $records,
  $format,
  $ext = null,
  $content_type = null 
)
protected

Definition at line 116 of file Table.php.

◆ downloadCSV()

downloadCSV (   $records)
protected

Definition at line 142 of file Table.php.

◆ downloadExcel()

downloadExcel (   $records)
protected

Definition at line 134 of file Table.php.

◆ downloadJSON()

downloadJSON (   $records)
protected

Definition at line 160 of file Table.php.

◆ downloadPDF()

downloadPDF (   $records)
protected

Definition at line 146 of file Table.php.

◆ downloadXLSX()

downloadXLSX (   $records)
protected

Definition at line 138 of file Table.php.

◆ downloadXML()

downloadXML (   $records)
protected

Definition at line 150 of file Table.php.

◆ format()

format (   $value)

Definition at line 104 of file Table.php.

◆ getCode()

getCode ( )
protected

Definition at line 250 of file Table.php.

◆ getColumns()

getColumns ( )
protected

Definition at line 254 of file Table.php.

◆ getDownloadFormats()

getDownloadFormats ( )
protected

Definition at line 265 of file Table.php.

◆ init()

init ( )
protected

Definition at line 64 of file Table.php.

◆ searchParams()

searchParams ( $search,
$order 
)

Definition at line 165 of file Table.php.

◆ sessionKey()

sessionKey (   $key)

Definition at line 75 of file Table.php.

Field Documentation

◆ $_code

$_code = null
protected

Definition at line 57 of file Table.php.

◆ $_columns

$_columns = null
protected

Definition at line 61 of file Table.php.

◆ $_descr

$_descr = null
protected

Definition at line 58 of file Table.php.

◆ $_downloadFormats

$_downloadFormats = null
protected

Definition at line 62 of file Table.php.

◆ $_key

$_key = null
protected

Definition at line 56 of file Table.php.

◆ $_parentKey

$_parentKey = null
protected

Definition at line 59 of file Table.php.

◆ $_search

$_search = null
protected

Definition at line 60 of file Table.php.

◆ $batchSize

$batchSize = 100

Definition at line 45 of file Table.php.

◆ $downloadBusyMessage

$downloadBusyMessage = null

Definition at line 53 of file Table.php.

◆ $downloadCookieKey

$downloadCookieKey = 'fred-controller-table-downloading'

Definition at line 52 of file Table.php.

◆ $downloadName

$downloadName = 'data'

Definition at line 51 of file Table.php.

◆ $downloadTimeout

$downloadTimeout = null

Definition at line 54 of file Table.php.

◆ $link

$link = null

Definition at line 46 of file Table.php.

◆ $pdfWriter

$pdfWriter = null

Definition at line 50 of file Table.php.

◆ $provider

$provider = null

Definition at line 44 of file Table.php.

◆ $sequence

$sequence = null

Definition at line 47 of file Table.php.

◆ $sequenceMessage

$sequenceMessage = '{[count<0]!}{[count>0]{[count|number()]}}'

Message for new records (available tags: count,.

Definition at line 48 of file Table.php.

◆ BATCH_SIZE

const BATCH_SIZE = 'batchSize'

Number of records to return per call.

Definition at line 18 of file Table.php.

◆ CODE

const CODE = 'code'

User code (what the user sees; default same as key).

Definition at line 13 of file Table.php.

◆ COLUMNS

const COLUMNS = 'columns'

Grid columns (key = column name, value = column config; code and description if empty).

Definition at line 16 of file Table.php.

◆ DESCR

const DESCR = 'descr'

Full description.

Definition at line 14 of file Table.php.

◆ DOWNLOAD_DEFAULT

const DOWNLOAD_DEFAULT = 16

Download by default (may be unselected by the user).

Definition at line 40 of file Table.php.

◆ DOWNLOAD_FORMATS

const DOWNLOAD_FORMATS = 'downloadFormats'

Available download formats (key = description, value = function (use '*' to.

Definition at line 19 of file Table.php.

◆ DOWNLOAD_NAME

const DOWNLOAD_NAME = 'downloadName'

Filename (without extension) used for download.

Definition at line 21 of file Table.php.

◆ DOWNLOAD_OPTIONAL

const DOWNLOAD_OPTIONAL = 64

Do not download by default, but make it selectable for the user.

Definition at line 42 of file Table.php.

◆ DOWNLOAD_VISIBLE

const DOWNLOAD_VISIBLE = 32

Download when visible.

Definition at line 41 of file Table.php.

◆ FORMAT

const FORMAT = 'format'

Formatting method.

Definition at line 33 of file Table.php.

◆ FORMAT_PARAMS

const FORMAT_PARAMS = 'formatParams'

Extra parameters for the formatting method.

Definition at line 34 of file Table.php.

◆ GROUP

const GROUP = 'group'

Show grouped data for this column (array with keys 'group' = column to group by - defaults to.

Definition at line 29 of file Table.php.

◆ KEY

const KEY = 'key'

System key (hidden from user).

Definition at line 11 of file Table.php.

◆ LINK

const LINK = 'link'

Link (URL) for a record ("[columnName]" is replaced by the value of that column, for that record).

Definition at line 17 of file Table.php.

◆ ORDER

const ORDER = 'order'

True if ordering the result by this column is allowed (default true if omitted).

Definition at line 24 of file Table.php.

◆ PARENT_KEY

const PARENT_KEY = 'parentKey'

Parent key column.

Definition at line 15 of file Table.php.

◆ PROVIDER

const PROVIDER = 'provider'

Data provider.

Definition at line 10 of file Table.php.

◆ SEARCH

const SEARCH = 'search'

Allowed search methods for this column (see \Rsi\Fred\Controller\Provider::SEARCH_*.

Definition at line 25 of file Table.php.

◆ SEQUENCE

const SEQUENCE = 'sequence'

Sequence key (higher = newer).

Definition at line 12 of file Table.php.

◆ TOTAL

const TOTAL = 'total'

Show total for this column (see \Rsi\Fred\Controller\Provider::TOTAL_* constants; one or.

Definition at line 27 of file Table.php.

◆ VISIBLE

const VISIBLE = 'visible'

Default visibility (see VISIBLE_* and DOWNLOAD_* constants).

Definition at line 35 of file Table.php.

◆ VISIBLE_DEFAULT

const VISIBLE_DEFAULT = 1

Show by deault (may be unselected by the user).

Definition at line 37 of file Table.php.

◆ VISIBLE_NEVER

const VISIBLE_NEVER = 4

Do not show (also not optional).

Definition at line 39 of file Table.php.

◆ VISIBLE_OPTIONAL

const VISIBLE_OPTIONAL = 2

Dont't show by default, but make it selectable for the user.

Definition at line 38 of file Table.php.


The documentation for this class was generated from the following file: