Framework  3.9
Data Display Controls

Classes

class  DataListView
 DataListView displays a list of DataItems (or InnerJoinResults) in tabular format. More...
 
class  FileNode
 
class  FolderNode
 
class  DirectoryTreeControl
 
class  DraggableList
 DraggableList provides a simple user interface for sorting a list of items. More...
 
class  ExcelFileWriter
 ExcelFileWriter is an abstract factory to allow different Excel libraries to be used at the programmer's preference. More...
 
interface  IExcelFile
 Minimum base interface that must be provided by an ExcelFile implementation. More...
 
class  ExcelFile
 Generate a binary format Microsoft Excel file for download. More...
 
class  ExpandingList
 The ExpandingList class provides a simple User Interface control to allow the display of list items by heading. More...
 
interface  FacetFilterable
 
class  AbstractFacetFilter
 
class  FacetManager
 
class  PanelFacetManager
 
class  FieldFacetFilter
 
class  ExpressionFacetFilter
 
class  MultiSelectFacetFilter
 
class  CrossReferenceFacetFilter
 
class  CheckListFacetFilter
 
class  DataGroup
 Represents a grouped collection of data within a table. More...
 
class  GroupedDataListView
 GroupedDataListView displays a list of DataItems (or InnerJoinResults) in tabular format grouped by a specific field. More...
 
class  GroupedListGroup
 Represents a grouped collection of data within a table. More...
 
class  GroupedList
 
class  PagedList
 The PagedList class provides a simple User Interface control to allow pagination of HTML lists of DataItems. More...
 
class  ServerPagedList
 ServerPagedList provides the same interface and functionality as PagedList, with the difference that paging is handled at the server. More...
 
class  StatusTrees
 
class  StatusBlockView
 
class  TreeNode
 TreeNode represents a node in the tree. More...
 
class  TreeControl
 The TreeControl provides a class that can be used to generate dynamic tree controls for use in PHP forms (or pages). More...
 

Functions

 DataListView::DataListView ($items, $id, $cssClass="list", $sortable=true, $pageSize=0, $filter=false)
 Creates a new DataListView object. More...
 
 DataListView::getID ()
 
 DataListView::scrollable ($height=300, $resizable=true)
 
 DataListView::enableDragReorder ($handler)
 Turns on drag & drop item reordering for the table. More...
 
 DataListView::column ($title, $format, $sortable=false, $style=null, $typeHint=null, $onExport=null, $sortFormat=null)
 Adds a column definition to the DataListView. More...
 
 DataListView::exportColumn ($title, $format, $sortable=false, $style=null, $typeHint=null, $onExport=null, $sortFormat=null)
 Adds a column definition to the DataListView that is only output when exporting the table to Excel. More...
 
 DataListView::setColumnOrder ($order)
 Override the column order. More...
 
 DataListView::selector ($format="")
 Adds a selector column to the DataListView. More...
 
 DataListView::formatRowId ($item)
 
 DataListView::commandMenu ()
 Adds a command menu to the table that can contain a list of operations that can be performed on subselections of the table's contents. More...
 
 DataListView::contextMenu ()
 Adds a right-click context menu to the table that can contain a list of operations that can be performed on subselections of the table's contents. More...
 
 DataListView::addToolbarCallback ($callback)
 Registers a toolbar callback. More...
 
 DataListView::footerText ($text="", $style="", $colspan=1)
 Adds a text column to the table footer. More...
 
 DataListView::footerValue ($callback, $style="", $colspan=1)
 Adds a value column to the table footer. More...
 
 DataListView::footerTotal ($field, $style="text-align: right", $colspan=1, $typeHint=Number)
 Sums the total for a column. More...
 
 DataListView::setID ($id=null)
 Sets the client-side ID for this DataListView. More...
 
 DataListView::addFacetTaggingHandler ($handler)
 Adds a row tagging handler. More...
 
 DataListView::getExcelLink ()
 Get the Excel Link. More...
 
 DataListView::autoPopulate ($item)
 Automatically build the table columns from the given DataItem. More...
 
 DataListView::writeScript ()
 Write the Javascript to implement the table output. More...
 
 DataListView::drawView ()
 Writes the HTML for the data table to the output buffer. More...
 
 DataListView::drawViewToString ()
 Render the table view and return the generated HTML as a string. More...
 
 DataListView::writeExcelFile ($file)
 Writes the data table out as an Excel File. More...
 
 FileNode::FileNode ($id, $title, $value)
 
 FileNode::calculateOpenState ()
 
 FileNode::writeHTML ()
 
 FolderNode::FolderNode ($id, $title, $value="", $checked=false, $closedStyle="tree_node_closed", $openStyle="tree_node_open", $leafStyle="tree_node_plain")
 
 FolderNode::writeHTML ()
 
 FolderNode::add (&$n)
 
 FolderNode::calculateOpenState ()
 
 DirectoryTreeControl::DirectoryTreeControl ($id, $title="", $showFiles=true, $style="tree", $scroll=true, $width=500, $height=400)
 
 DirectoryTreeControl::buildFolderTree ($folder, $base)
 
 DirectoryTreeControl::_buildFolderTreeAux ($folder, $base)
 
 DirectoryTreeControl::addFiles ($folder, $base, $filter=null)
 
 DirectoryTreeControl::writeScript ()
 
 DirectoryTreeControl::writeHTML ()
 
 DirectoryTreeControl::getIcon ($file)
 
 DirectoryTreeControl::add (&$n)
 
 DirectoryTreeControl::findFolder ($path)
 
DirectoryTreeControl::findNode ($path)
 
 PagedList::PagedList ($items, $id="paged_list", $format=null)
 Creates a new PagedList control. More...
 
 PagedList::getID ()
 
 PagedList::addFacetTaggingHandler ($handler)
 Adds a row tagging handler. More...
 
 PagedList::writeScript ()
 
 PagedList::drawList ()
 
 PagedList::formatIdTag ($item)
 
 PagedList::drawListToString ()
 Helpful utility function - generates the list HTML in an output buffer and returns the string representation. More...
 
 ServerPagedList::__construct ($items, $id="paged_list", $format=null)
 
 ServerPagedList::writeScript ()
 
 ServerPagedList::drawList ()
 
 ServerPagedList::formatIdTag ($item)
 

Variables

 DataListView::$columns
 The column definitions for the table. More...
 
 DataListView::$footerColumns
 The footer column definitions for the table. More...
 
 DataListView::$cssClass
 Optional CSS class to apply to the table. More...
 
 DataListView::$id
 ID of the table in the output script. More...
 
 DataListView::$sortable
 Specifies whether to enable client-side sorting for this table. More...
 
 DataListView::$pageSize
 Specifies the number of items per page - set to zero for unpaginated. More...
 
 DataListView::$cssStyle
 Optional additional inline styles to apply to the table. More...
 
 DataListView::$emptyMessage
 Message to display when no items are present in the data set. More...
 
 DataListView::$onStartRow
 Callback hook that gets called at the start of each row. More...
 
 DataListView::$onDrawfooter
 Callback hook that gets called after all rows have been drawn. More...
 
 DataListView::$tagRowCallbacks
 Array of callbacks for adding extra attributes to each row. More...
 
 DataListView::$totalCallbacks
 Array of callbacks for totalling columns. More...
 
 DataListView::$filter
 Specifies whether to enable client-side filtering for this table. More...
 
 DataListView::$excelFile
 Filename for automatic Excel export. More...
 
 DataListView::$paginate = true
 Specifies whether table should be paginated (false for view only pages) More...
 
 DataListView::$summary
 Human-readable summary of the information contained in the table (for usability/accessiblity purposes) More...
 
 DataListView::$zebra
 Specifies whether alternate rows in the table should be striped. More...
 
 DataListView::$height
 
 DataListView::$scrollable = false
 
 DataListView::$resizable = true
 
 DataListView::$rowId = false
 whether to include an id tag for each tr row More...
 
 DataListView::$rowIdFormat = null
 Optionally specify a custom row ID format. More...
 
 DataListView::$dragReorder = false
 Enabled drag & drop reordering. More...
 
 DataListView::$reorderHandler = null
 Handler script that implements reordering records. More...
 
 DataListView::$dragColumnReorder = false
 Enable drag & drop column reordering and show/hide capabilities. More...
 
 DataListView::$columnReorderCallback = null
 Javascript callback function that is triggered when columns are reordered. More...
 
 DataListView::$hideExcelIcon = false
 Suppress the automatic Excel icon if you want an external link. More...
 
 DataListView::$onRowClick = null
 Javascript callback function that is triggered with a row is clicked. More...
 
 DataListView::$onRowHover = null
 Javascript callback function that is triggered with a row is hovered over. More...
 
 DataListView::$dragText = ""
 Optional text to display above reorderable table. More...
 
 DataListView::$selectable = false
 Whether the table provides a selection mechanism. More...
 
 DataListView::$showSelectAll = false
 Show Select All button for selectable tables. More...
 
 DataListView::$menu = null
 Command menu for selection-based operations. More...
 
 DataListView::$contextMenu = null
 Right-click context menu for selection based operations. More...
 
 DataListView::$commandMenuIcon = "/fakoli/images/data_view_menu.png"
 Icon to use for the command menu dropdown. More...
 
 DataListView::$toolbarCallbacks = array()
 Override this callback to add toolbar links into the first header cell. More...
 
static DataListView::$includesWritten = false
 
 $_writtenDirectoryTreeControlScript = false
 
 FileNode::$id
 
 FileNode::$title
 
 FileNode::$value
 
 FolderNode::$children = array()
 
 FolderNode::$id
 
 FolderNode::$title
 
 FolderNode::$value
 
 FolderNode::$checked
 
 FolderNode::$closedStyle
 
 FolderNode::$openStyle
 
 FolderNode::$open
 
 DirectoryTreeControl::$id
 
 DirectoryTreeControl::$title
 
 DirectoryTreeControl::$style
 
 DirectoryTreeControl::$scroll
 
 DirectoryTreeControl::$width
 
 DirectoryTreeControl::$height
 
 DirectoryTreeControl::$showFiles = true
 
 DirectoryTreeControl::$selectedValue
 
 DirectoryTreeControl::$multiSelect = false
 
 DirectoryTreeControl::$selectMode = "folder"
 
 DirectoryTreeControl::$children
 
 DirectoryTreeControl::$images
 
 DirectoryTreeControl::$icons
 
 PagedList::$items
 The items to be displayed in the list. More...
 
 PagedList::$id
 The HTML id of the list. More...
 
 PagedList::$format
 The formatter used to display the list items (either a format string or a callback function or method) More...
 
 PagedList::$pageSize = 10
 The number of items per page. More...
 
 PagedList::$listTag = "ul"
 The HTML list tag type. More...
 
 PagedList::$CSSclass = null
 CSS class(es) to be applied to the list. More...
 
 PagedList::$styles = null
 Specific CSS styles to be applied to the list. More...
 
 PagedList::$emptyList = "No items in the list"
 Message to display when the list is empty. More...
 
 PagedList::$paginate = true
 Specifies whether list should be paginated (false for view only pages) More...
 
 PagedList::$writeIdTag = false
 whether to include an id tag for each li item More...
 
 PagedList::$tagRowCallbacks
 Array of callbacks for adding extra attributes to each row. More...
 
 PagedList::$onStartRow
 Callback for setting the CSS class / visibility of each item in the list. More...
 
 PagedList::$displayMode = "list-item"
 CSS display type for visible items. More...
 
 ServerPagedList::$items
 
 ServerPagedList::$id
 
 ServerPagedList::$format
 
 ServerPagedList::$pageSize = 10
 The number of items per page. More...
 
 ServerPagedList::$listTag = "ul"
 The HTML list tag type. More...
 
 ServerPagedList::$CSSclass = null
 CSS class(es) to be applied to the list. More...
 
 ServerPagedList::$styles = null
 Specific CSS styles to be applied to the list. More...
 
 ServerPagedList::$emptyList = "No items in the list"
 Message to display when the list is empty. More...
 
 ServerPagedList::$paginate = true
 Specifies whether list should be paginated. More...
 
 ServerPagedList::$page = -1
 
 ServerPagedList::$writeIdTag = false
 whether to include an id tag for each li item More...
 
 $_writtenTreeControlScript = false
 This file provides a class-based API for generating expanding tree controls. More...
 
 $_activeTree = null
 Global reference to currently drawing tree instance. More...
 

Detailed Description

Function Documentation

◆ __construct()

ServerPagedList::__construct (   $items,
  $id = "paged_list",
  $format = null 
)

Definition at line 214 of file paged_list.inc.

215  {
216  $this->items = $items;
217  $this->id = $id;
218  $this->format = $format;
219  }

◆ _buildFolderTreeAux()

DirectoryTreeControl::_buildFolderTreeAux (   $folder,
  $base 
)

Definition at line 287 of file directory_tree.inc.

288  {
289  $f = $base . DIRECTORY_SEPARATOR . $folder;
290  trace("Directory tree: buildFolderTreeAux f $f", 3);
291  $dir = opendir($f);
292 
293  $id = $this->id."_".str_replace(DIRECTORY_SEPARATOR, "_", $folder);
294  if ($this->permissionCallback && !call_user_func($this->permissionCallback, $folder)) return null;
295 
296  $node = new FolderNode($id, basename($folder), $folder);
297  while( $directory = readdir($dir))
298  {
299  if ($directory == "." || $directory == "..") continue;
300 
301  if (is_dir($base . DIRECTORY_SEPARATOR . $folder . DIRECTORY_SEPARATOR . $directory))
302  {
303  $node->add($this->_buildFolderTreeAux($folder . DIRECTORY_SEPARATOR . $directory, $base));
304  }
305  }
306 
307  closedir($dir);
308  $this->folders[$folder] = $node;
309 
310  return $node;
311  }
_buildFolderTreeAux($folder, $base)
trace($msg, $lvl=3, $callStack=null)
Send output to the trace log.
Definition: functions.inc:1010

◆ add() [1/2]

FolderNode::add ( $n)

Definition at line 190 of file directory_tree.inc.

191  {
192  if (!$n) return;
193 
194  trace($this->id." adding ".$n->id, 3);
195  if (is_array($n))
196  {
197  for($i = 0; $i < count($n); ++$i)
198  {
199  $this->children[$n[$i]->title] = $n[$i];
200  }
201  }
202  else
203  {
204  $this->children[$n->title] = $n;
205  }
206  }

◆ add() [2/2]

DirectoryTreeControl::add ( $n)

Definition at line 452 of file directory_tree.inc.

453  {
454  trace($this->id." adding ".$n->id, 3);
455  if (is_array($n))
456  {
457  for($i = 0; $i < count($n); ++$i)
458  {
459  $this->children[$n[$i]->title] = &$n[$i];
460  }
461  }
462  else
463  {
464  $this->children[$n->title] =& $n;
465  }
466  }

◆ addFacetTaggingHandler() [1/2]

DataListView::addFacetTaggingHandler (   $handler)

Adds a row tagging handler.

This function will receive the data item for each row and can add custom attributes to the row tag.

Implements FacetFilterable.

Definition at line 376 of file data_view.inc.

377  {
378  $this->tagRowCallbacks[] = $handler;
379  }

◆ addFacetTaggingHandler() [2/2]

PagedList::addFacetTaggingHandler (   $handler)

Adds a row tagging handler.

This function will receive the data item for each row and can add custom attributes to the row tag.

Implements FacetFilterable.

Definition at line 82 of file paged_list.inc.

83  {
84  $this->tagRowCallbacks[] = $handler;
85  }

◆ addFiles()

DirectoryTreeControl::addFiles (   $folder,
  $base,
  $filter = null 
)

Definition at line 313 of file directory_tree.inc.

314  {
315  $f = $base . DIRECTORY_SEPARATOR . $folder;
316  $dir = opendir($f);
317 
318  $id = str_replace(DIRECTORY_SEPARATOR, "_", $folder);
319  if ($this->permissionCallback && !call_user_func($this->permissionCallback, $folder)) return null;
320 
321  while( $file = readdir($dir))
322  {
323  if ($file == "." || $file == "..") continue;
324 
325  $f = $base . DIRECTORY_SEPARATOR . $folder . DIRECTORY_SEPARATOR . $file;
326  if (is_dir($f))
327  {
328  $this->addFiles($folder . DIRECTORY_SEPARATOR . $file, $base, $filter);
329  }
330  else if (is_file($f))
331  {
332  if ($filter && !call_user_func($filter, $f))
333  {
334  continue;
335  }
336 
337  trace("$f", 3);
338 
339  $node = new FileNode($id . "_" . str_replace(".", "_", $file), $file, $folder . DIRECTORY_SEPARATOR . $file);
340  $this->findFolder($folder)->add($node);
341  }
342  }
343  }
addFiles($folder, $base, $filter=null)

◆ addToolbarCallback()

DataListView::addToolbarCallback (   $callback)

Registers a toolbar callback.

These can be used to add custom controls into the first header cell of the table, next to the Excel export icon or command menu dropdown icon.

Parameters
callable$callbackthe callback function or method

Definition at line 308 of file data_view.inc.

309  {
310  $this->toolbarCallbacks[] = $callback;
311  }

◆ autoPopulate()

DataListView::autoPopulate (   $item)

Automatically build the table columns from the given DataItem.

Not recommended except for quick and dirty pages. This method is called automatically if no columns have been defined before drawing the view.

Parameters
$itemDataItem the item to use as a template for the columns.

Definition at line 395 of file data_view.inc.

396  {
397  if (count($this->columns) > 0) return;
398 
399  $fields = $item->getFieldArray();
400  foreach($fields as $field)
401  {
402  if ($item->primary_key == $field) continue;
403 
404  $this->column($item->prettifyFieldName($field), "{".$field."}", $true);
405  }
406  }
column($title, $format, $sortable=false, $style=null, $typeHint=null, $onExport=null, $sortFormat=null)
Adds a column definition to the DataListView.
Definition: data_view.inc:178

◆ buildFolderTree()

DirectoryTreeControl::buildFolderTree (   $folder,
  $base 
)

Definition at line 280 of file directory_tree.inc.

281  {
282  trace("Building Folder Tree: $folder, $base", 3);
283  $root = $this->_buildFolderTreeAux($folder, $base);
284  $this->children[$folder] = $root;
285  }

◆ calculateOpenState() [1/2]

FileNode::calculateOpenState ( )

Definition at line 54 of file directory_tree.inc.

55  {
56  return false;
57  }

◆ calculateOpenState() [2/2]

FolderNode::calculateOpenState ( )

Definition at line 208 of file directory_tree.inc.

209  {
210  if ($this->open) return true;
211  if ($this->checked)
212  {
213  $this->open = true;
214  return true;
215  }
216 
217  $c = count($this->children);
218 
219  foreach($this->children as $key => $child)
220  {
221  if ($child->calculateOpenState())
222  {
223  $this->open = true;
224  return true;
225  }
226  }
227 
228  $this->open = false;
229  return false;
230  }

◆ column()

DataListView::column (   $title,
  $format,
  $sortable = false,
  $style = null,
  $typeHint = null,
  $onExport = null,
  $sortFormat = null 
)

Adds a column definition to the DataListView.

Parameters
string$titlethe title of the column
string$formatthe formatter for the column, either as a formatting string or callback function. (For details on format template specifications, see comments above class DataItem function format.)
boolean$sortablewhether this column is sortable
string$styleany inline styles specific to this column
string$typeHinthint for cell type to use when exporting to Excel
callable$onExportoptional callback function to format value for Excel
string$sortFormatOptional explicit format to use as the basis for sorting
Returns
DataListView returns the current instance, allowing function call chaining for the column definitions.

Definition at line 178 of file data_view.inc.

179  {
180  $this->columns[] = new DataColumn($title, $format, $sortable, $style, $typeHint, $onExport, $sortFormat);
181  return $this;
182  }
Represents a column in a DataListView output table.
Definition: data_column.inc:39
$sortable
Specifies whether to enable client-side sorting for this table.
Definition: data_view.inc:61

◆ commandMenu()

DataListView::commandMenu ( )

Adds a command menu to the table that can contain a list of operations that can be performed on subselections of the table's contents.

A dropdown control is automatically attached to the top left of the table. If Excel exporting has been enabled, it will be added to the command menu.

Returns
ContextMenu

Definition at line 266 of file data_view.inc.

267  {
268  if ($this->menu) return $this->menu;
269 
270  $this->menu = new ContextMenu($this->id . "_menu", "#{$this->id}_menu_button");
271  $this->menu->trigger = "click";
272  $this->menu->position = "element";
273 
274  if ($this->showSelectAll)
275  {
276  $this->menu->command("toggle_select_all", "Select All", "new DOMEvent(event).stop(); SortingTable.toggleSelect(this, '{$this->id}');", false);
277  }
278  return $this->menu;
279  }
$menu
Command menu for selection-based operations.
Definition: data_view.inc:98

◆ contextMenu()

DataListView::contextMenu ( )

Adds a right-click context menu to the table that can contain a list of operations that can be performed on subselections of the table's contents.

If Excel exporting has been enabled, it will be added to the context menu.

Returns
ContextMenu

Definition at line 287 of file data_view.inc.

288  {
289  if ($this->contextMenu) return $this->contextMenu;
290 
291  $this->contextMenu = new ContextMenu($this->id . "_context_menu", "#{$this->id}");
292  $this->contextMenu->trigger = "contextmenu";
293  $this->contextMenu->position = "pointer";
294 
295  if ($this->showSelectAll)
296  {
297  $this->contextMenu->command("toggle_select_all", "Select All", "new DOMEvent(event).stop(); SortingTable.toggleSelect(this, '{$this->id}');", false);
298  }
299  return $this->contextMenu;
300  }
$contextMenu
Right-click context menu for selection based operations.
Definition: data_view.inc:99
contextMenu()
Adds a right-click context menu to the table that can contain a list of operations that can be perfor...
Definition: data_view.inc:287

◆ DataListView()

DataListView::DataListView (   $items,
  $id,
  $cssClass = "list",
  $sortable = true,
  $pageSize = 0,
  $filter = false 
)

Creates a new DataListView object.

Parameters
array$itemsthe array of DataItems or InnerJoinResults to be displayed
string$idthe client-side ID for this table
string$cssClassOptional CSS class to apply to the table
string$sortableSpecifies whether to enable client-side sorting for this table
integer$pageSizeSpecifies the number of items per page - set to zero for unpaginated
boolean$filterSpecifies whether to enable client-side filtering for this table.

Definition at line 114 of file data_view.inc.

115  {
116  $this->items = $items;
117  $this->id = $id;
118  $this->cssClass = $cssClass;
119  $this->sortable = $sortable;
120  $this->filter = $filter;
121  $this->pageSize = $pageSize;
122  $this->cssStyle = null;
123  $this->emptyMessage = "No matching items.";
124  $this->onStartRow = null;
125  $this->excelFile = null;
126  $this->summary = null;
127  $this->zebra = true;
128  $this->totalCallbacks = array();
129  $this->tagRowCallbacks = array();
130 
131  return $this;
132  }
$id
ID of the table in the output script.
Definition: data_view.inc:60
$pageSize
Specifies the number of items per page - set to zero for unpaginated.
Definition: data_view.inc:62
$cssClass
Optional CSS class to apply to the table.
Definition: data_view.inc:59
$filter
Specifies whether to enable client-side filtering for this table.
Definition: data_view.inc:69

◆ DirectoryTreeControl()

DirectoryTreeControl::DirectoryTreeControl (   $id,
  $title = "",
  $showFiles = true,
  $style = "tree",
  $scroll = true,
  $width = 500,
  $height = 400 
)

Definition at line 268 of file directory_tree.inc.

269  {
270  $this->id = $id;
271  $this->title = $title;
272  $this->style = $style;
273  $this->scroll = $scroll;
274  $this->width = $width;
275  $this->height = $height;
276  $this->showFiles = $showFiles;
277  }

◆ drawList() [1/2]

PagedList::drawList ( )

Definition at line 105 of file paged_list.inc.

106  {
107  if (!count($this->items))
108  {
109  echo "<p>{$this->emptyList}</p>";
110  return;
111  }
112 
113  $attrs = "";
114  if ($this->CSSclass) $attrs .= " class='{$this->CSSclass}'";
115  if ($this->styles) $attrs .= " style='{$this->styles}'";
116  if($this->paginate)
117  {
118 ?>
119  <div style="float: right;" class="paginator">
120  <ul id="<?echo $this->id?>_paginator"></ul>
121  </div>
122  <?php
123  }
124  ?>
125  <<?echo $this->listTag?> id="<?echo $this->id?>"<?echo $attrs?>>
126 <?
127  foreach($this->items as $item)
128  {
129  $css = "";
130 
131 
132  if ($this->onStartRow)
133  {
134  $css = call_user_func($this->onStartRow, $item);
135  if ($css === false) continue; // Skip this record if false returned
136  }
137 
138  if ($css) $css = " class='$css'";
139 
140  if($this->writeIdTag)
141  {
142  $idTag = "id='".$this->formatIdTag($item)."'";
143  }
144 
145  $dataAttrs = array();
146  foreach($this->tagRowCallbacks as $cb)
147  {
148  $dataAttrs = call_user_func($cb, $item, $dataAttrs);
149  }
150 
151  $rowAttrs = "";
152  foreach($dataAttrs as $name => $value)
153  {
154  $rowAttrs .= " ".$name."='".$value."'";
155  }
156 
157  echo "<li {$idTag}{$css}{$rowAttrs}>";
158 
159  if (is_callable($this->format))
160  {
161  echo call_user_func($this->format, $item);
162  }
163  else echo $item->format($this->format);
164 
165  echo "</li>\n";
166  }
167  echo "</{$this->listTag}>\n";
168  }

◆ drawList() [2/2]

ServerPagedList::drawList ( )

Definition at line 226 of file paged_list.inc.

227  {
228  if (!count($this->items))
229  {
230  echo "<p>{$this->emptyList}</p>";
231  return;
232  }
233 
234  if ($this->page == -1)
235  {
236  $this->page = checkNumeric($_GET["page"]);
237  if (!$this->page) $this->page = 1;
238  }
239 
240  if ($this->paginate)
241  {
242  $start = ($this->page - 1) * $this->pageSize;
243  if ($start < 0) $start = 0;
244 
245  $end = $start + $this->pageSize;
246  if ($end > count($this->items)) $end = count($this->items);
247  }
248  else
249  {
250  $start = 0;
251  $end = count($this->items);
252  }
253 
254  $attrs = "";
255  if ($this->CSSclass) $attrs .= " class='{$this->CSSclass}'";
256  if ($this->styles) $attrs .= " style='{$this->styles}'";
257 
258  if($this->paginate)
259  {
260 
261  $prev = $this->page - 1;
262  if ($prev < 1) $prev = 1;
263  $next = $this->page + 1;
264  $total = intval((count($this->items) - 1) / $this->pageSize + 1);
265  if ($next > $total) $next = $total;
266  ?>
267  <div style="float: right;" class="paginator">
268  <ul id="<?echo $this->id?>_paginator">
269  <li><a href="?page=<?echo $prev?>" class="paginate"><span>&lt;&lt; Prev</span></a></li>
270  <li class="pager"><a href="#" class="goto-page">Page <?echo $this->page?> of <?echo $total?></a></li>
271  <li><a href="?page=<?echo $next?>" class="paginate"><span>Next &gt;&gt;</span></a></li>
272  </ul>
273  </div>
274  <?php
275  }
276  ?>
277  <<?echo $this->listTag?> id="<?echo $this->id?>"<?echo $attrs?>>
278 <?
279  for($i = $start; $i < $end; ++$i)
280  {
281  $item = $this->items[$i];
282 
283  if($this->writeIdTag)
284  {
285  $idTag = " id='".$this->formatIdTag($item)."'";
286  }
287 
288  echo "<li{$idTag}>";
289 
290  if (is_callable($this->format))
291  {
292  echo call_user_func($this->format, $item);
293  }
294  else echo $item->format($this->format);
295 
296  echo "</li>\n";
297  }
298  echo "</{$this->listTag}>\n";
299  }
$pageSize
The number of items per page.
Definition: paged_list.inc:205
checkNumeric($p)
Security helper function.
Definition: functions.inc:630

◆ drawListToString()

PagedList::drawListToString ( )

Helpful utility function - generates the list HTML in an output buffer and returns the string representation.

This is useful for resolving issues in rendering order that can occur when working with facets.

Returns
string the HTML output for the list

Definition at line 182 of file paged_list.inc.

183  {
184  ob_start();
185  $this->drawList();
186  $out = ob_get_contents();
187  ob_end_clean();
188  return $out;
189  }

◆ drawView()

DataListView::drawView ( )

Writes the HTML for the data table to the output buffer.

Definition at line 509 of file data_view.inc.

510  {
511  trace("Number of Items: ".count($this->items), 3);
512 
513  if (count($this->items) > 0)
514  {
515  if (!count($this->columns)) $this->autoPopulate($this->items[0]); // Autopopulate the column list from the first object, if not specified
516  $attrs = "";
517  if ($this->id)
518  {
519  $attrs .= " id='{$this->id}'";
520  }
521 
522  if ($this->cssClass)
523  {
524  $attrs .= " class='{$this->cssClass}";
525  if ($this->sortable) $attrs .=" sortable";
526  if ($this->scrollable) $attrs.= " scroll";
527  if ($this->dragReorder) $attrs .= " reorder";
528  $attrs .= "'";
529  }
530 
531  if ($this->cssStyle)
532  {
533  $attrs .= " style='{$this->cssStyle}'";
534  }
535 
536  if ($this->summary)
537  {
538  $attrs .= " summary='".htmlSafe($this->summary)."'";
539  }
540 
541  /*
542  * JDG 6/15/2010 - if the cssStyle has a width setting, either px or
543  * &, apply that width style to the filter and paginator to avoid
544  * formatting problems.
545  */
546  $width = 'width: 100%';
547  if (preg_match("/^\\width:.*?\\d{1,5}px|width:.*?\\d{1,3}%/", $this->cssStyle, $matches))
548  $width = $matches[0];
549 
550 ?>
551  <div style="<?echo $width ?>">
552  <?php
553  if($this->pageSize)
554  {
555  ?>
556  <div style="float: right;" class="paginator"><ul id="<?echo $this->id?>_paginator"></ul></div>
557  <?php
558  }
559 
560  if($this->filter)
561  {
562  ?>
563  <div style="float: left" class="filter" id="<?echo $this->id?>_filter"></div>
564  <?php
565  }
566 
567  if ($this->dragReorder)
568  {
569  echo $this->dragText;
570  }
571  ?>
572  </div>
573 
574  <?php
575  if ($this->scrollable)
576  {
577  $tbodyAttrs = " style='height: ".($this->height - 24)."px'";
578  echo "<div class='scrollContainer' style='height: {$this->height}px'>";
579  }
580  ?>
581  <table border="0" cellpadding="0" cellspacing="0"<?echo $attrs?>>
582  <thead>
583  <tr>
584 <?php
585  $first = true;
586 
587  foreach($this->columns as $column)
588  {
589  if ($column->exportOnly) continue;
590 
591  $attrs = "";
592  $cssClass = "";
593 
594  if (!$column->sortable)
595  {
596  $cssClass = trim($cssClass." nosort");
597  }
598 
599  if ($cssClass)
600  {
601  $attrs .= " class='$cssClass'";
602  }
603 
604  if (preg_match("/^\\width:.*?\\d{1,3}px|width:.*?\\d{1,3}%/", $column->style, $matches))
605  {
606  $attrs .= " style='{$matches[0]}'";
607  }
608 
609  if ($column->sortFormat) $attrs .= " data-sort='true'";
610 ?>
611  <th<?echo $attrs?>>
612 <?php
613 
614  if ($first)
615  {
616  if ($this->excelFile)
617  {
618  $qs = $this->getExcelLink();
619  }
620 
621  if ($this->excelFile && !$this->menu && !$this->hideExcelIcon)
622  {
623 ?>
624  <a href='<?echo $qs?>' style="float: left"><img src="/fakoli/images/msexcel_icon_small.png" alt="Excel" style="border: none; display:inline-block;vertical-align: middle"/></a>
625 <?
626  }
627  else if ($this->menu)
628  {
629  if ($this->excelFile)
630  {
631  $this->menu->command($this->id."_excel", "Save as Excel...", $qs, true, "/fakoli/images/msexcel_icon_small.png");
632  }
633 ?>
634  <img id="<?echo $this->id?>_menu_button" src="<?echo $this->commandMenuIcon?>" alt="Table Menu" style="border: none; display:inline-block;vertical-align: middle"/>
635 <?
636  }
637 
638  if ($this->contextMenu && $this->excelFile)
639  {
640  $this->menu->command($this->id."_context_excel", "Save as Excel...", $qs, true, "/fakoli/images/msexcel_icon_small.png");
641  }
642 
643  foreach($this->toolbarCallbacks as $callback)
644  {
645  echo "<div style='display: inline-block; float: left'>";
646  echo call_user_func($callback, $this);
647  echo "</div>";
648  }
649  }
650  $first = false;
651 ?>
652 <?echo $column->title?></th>
653 <?
654  }
655 ?>
656  </tr>
657  </thead>
658  <tbody<?echo $tbodyAttrs?>>
659 <?
660  foreach($this->items as $item)
661  {
662  $cl = array();
663  if($this->rowId)
664  $rowId = $this->formatRowId($item);
665 
666  if ($this->onStartRow)
667  {
668  $retval = call_user_func($this->onStartRow, $item);
669  if ($retval === false) continue; // return false to indicate row should be skipped
670  if ($retval) $cl[] = $retval; // return a string to indicate a css class for the row
671  }
672 
673  $dataAttrs = array();
674  foreach($this->tagRowCallbacks as $cb)
675  {
676  $dataAttrs = call_user_func($cb, $item, $dataAttrs);
677  }
678 
679  $rowAttrs = "";
680  foreach($dataAttrs as $name => $value)
681  {
682  $rowAttrs .= " ".$name."='".$value."'";
683  }
684 
685  foreach($this->totalCallbacks as $cb)
686  {
687  call_user_func($cb, $item);
688  }
689 
690  $onclick = "";
691 
692  if ($this->onRowClick)
693  {
694  $onclick = " onclick=\"" . $item->format($this->onRowClick) . "\" onmouseover=\"this.addClass('hover');";
695  if ($this->onRowHover) $onlick .= $item->format($this->onRowHover);
696  $onclick .=" return false;\" onmouseout=\"this.removeClass('hover'); return false;\"";
697  $cl[] = "clickable";
698  }
699 
700  $cl = implode(" ", $cl);
701  if ($cl) $cl = "class='$cl'";
702  if ($rowId) $rowId = "id='$rowId' ";
703 ?>
704  <tr <?echo $rowId?><?php echo $cl?><?echo $onclick?><?echo $rowAttrs?>>
705 <?php
706  foreach($this->columns as $column)
707  {
708  if ($column->exportOnly) continue;
709 
710  $attrs = "";
711  $cssClass = "";
712 
713  if (preg_match("/^[\\w_]*$/", $column->style))
714  {
715  $cssClass = $column->style;
716  }
717  else
718  {
719  $attrs .= " style='{$column->style}'";
720  }
721 
722  if ($cssClass)
723  {
724  $attrs .= " class='$cssClass'";
725  }
726 
727  if ($column->sortFormat) $attrs .= " data-sort='".htmlentities($item->format($column->sortFormat))."'";
728 ?>
729  <td<?echo $attrs?>><?echo $column->format($item)?></td>
730 <?php
731  }
732 ?>
733  </tr>
734 <?php
735  }
736 ?>
737  </tbody>
738 <?php
739  if ($this->onDrawFooter) call_user_func($this->onDrawFooter);
740 
741  if (count($this->footerColumns) > 0)
742  {
743 ?>
744  <tfoot>
745  <tr>
746 <?php
747  foreach($this->footerColumns as $column)
748  {
749  $attrs = "";
750  $cssClass = "";
751  if ($column->style)
752  {
753  if (preg_match("/^[\\w_]*$/", $column->style))
754  {
755  $attrs .= " class='{$column->style}'";
756  }
757  else
758  {
759  $attrs .= " style='{$column->style}'";
760  }
761  }
762 
763  if ($column->colspan > 1)
764  {
765  if (!$this->dragColumnReorder)
766  {
767  $attrs .= " colspan='{$column->colspan}'";
768  ?>
769  <td<?echo $attrs?>><?echo $column->format()?></td>
770 <?php
771  }
772  else if (preg_match("/text-align:\\s*right/i", $column->style))
773  {
774  for($i = 1; $i < $column->colspan; ++$i)
775  {
776  echo "<td>&nbsp;</td>";
777  }
778 ?>
779 <td<?echo $attrs?>><?echo $column->format()?></td>
780 <?
781  }
782  else
783  {
784 ?>
785 <td<?echo $attrs?>><?echo $column->format()?></td>
786 <?
787  for($i = 1; $i < $column->colspan; ++$i)
788  {
789  echo "<td>&nbsp;</td>";
790  }
791  }
792  }
793  else
794  {
795 ?>
796 <td<?echo $attrs?>><?echo $column->format()?></td>
797 <?
798  }
799  }
800 ?>
801  </tr>
802  </tfoot>
803 <?php
804  }
805 ?>
806  </table>
807 <?php
808  if ($this->scrollable) echo "</div>";
809 
810  if ($this->menu) echo $this->menu->writeMenu();
811  if ($this->contextMenu) echo $this->contextMenu->writeMenu();
812  }
813  else
814  {
815  echo "<p><em>{$this->emptyMessage}</em></p>";
816  }
817  }
$rowId
whether to include an id tag for each tr row
Definition: data_view.inc:83
formatRowId($item)
Definition: data_view.inc:248
$dragText
Optional text to display above reorderable table.
Definition: data_view.inc:93
autoPopulate($item)
Automatically build the table columns from the given DataItem.
Definition: data_view.inc:395
scrollable($height=300, $resizable=true)
Definition: data_view.inc:140
getExcelLink()
Get the Excel Link.
Definition: data_view.inc:384

◆ drawViewToString()

DataListView::drawViewToString ( )

Render the table view and return the generated HTML as a string.

Returns
string the generated HTML for the table

Definition at line 823 of file data_view.inc.

824  {
825  ob_start();
826  $this->drawView();
827  $out = ob_get_contents();
828  ob_end_clean();
829  return $out;
830  }
drawView()
Writes the HTML for the data table to the output buffer.
Definition: data_view.inc:509

◆ enableDragReorder()

DataListView::enableDragReorder (   $handler)

Turns on drag & drop item reordering for the table.

This feature disables sorting, paging and filtering for the table.

Parameters
string$handlerURL of the handler script that processes the item reordering

Definition at line 153 of file data_view.inc.

154  {
155  $this->sortable = false;
156  $this->filter = false;
157  $this->pageSize = 0;
158  $this->paginate = false;
159  $this->dragReorder = true;
160  $this->rowId = true;
161  $this->zebra = false;
162 
163  $this->reorderHandler = $handler;
164  }

◆ exportColumn()

DataListView::exportColumn (   $title,
  $format,
  $sortable = false,
  $style = null,
  $typeHint = null,
  $onExport = null,
  $sortFormat = null 
)

Adds a column definition to the DataListView that is only output when exporting the table to Excel.

Use this method for extended detail columns when space is constrained on the page but more details might be useful in an exported spreadsheet

Parameters
string$titlethe title of the column
string$formatthe formatter for the column, either as a formatting string or callback function. (For details on format template specifications, see comments above class DataItem function format.)
boolean$sortablewhether this column is sortable
string$styleany inline styles specific to this column
string$typeHinthint for cell type to use when exporting to Excel
callable$onExportoptional callback function to format value for Excel
string$sortFormatOptional explicit format to use as the basis for sorting
Returns
DataListView returns the current instance, allowing function call chaining for the column definitions.

Definition at line 198 of file data_view.inc.

199  {
200  $column = new DataColumn($title, $format, $sortable, $style, $typeHint, $onExport, $sortFormat);
201  $column->exportOnly = true;
202  $this->columns[] = $column;
203  return $this;
204  }

◆ FileNode()

FileNode::FileNode (   $id,
  $title,
  $value 
)

Definition at line 46 of file directory_tree.inc.

47  {
48  $this->id = $id;
49  $this->title = $title;
50  $this->value = $value;
51  }

◆ findFolder()

DirectoryTreeControl::findFolder (   $path)

Definition at line 468 of file directory_tree.inc.

469  {
470  return $this->folders[$path];
471  }

◆ findNode()

& DirectoryTreeControl::findNode (   $path)

Definition at line 473 of file directory_tree.inc.

474  {
475  trace("DirectoryTree:findNode($path)", 4);
476  $elts = explode(DIRECTORY_SEPARATOR, $path);
477 
478  $node =& $this;
479 
480  foreach($elts as $elt)
481  {
482  $match = false;
483 
484  if (isset($node->children[$elt]))
485  {
486  $node =& $node->children[$elt];
487  }
488  else return null;
489  }
490 
491  if ($node === $this) $node = null;
492 
493  trace("Found Node: {$node->id}", 3);
494  return $node;
495  }

◆ FolderNode()

FolderNode::FolderNode (   $id,
  $title,
  $value = "",
  $checked = false,
  $closedStyle = "tree_node_closed",
  $openStyle = "tree_node_open",
  $leafStyle = "tree_node_plain" 
)

Definition at line 82 of file directory_tree.inc.

83  {
84  $this->id = $id;
85  $this->title = $title;
86  $this->value = $value;
87  $this->checked = $checked;
88  $this->closedStyle = $closedStyle;
89  $this->openStyle = $openStyle;
90  $this->leafStyle = $leafStyle;
91  $this->open = false;
92  }

◆ footerText()

DataListView::footerText (   $text = "",
  $style = "",
  $colspan = 1 
)

Adds a text column to the table footer.

Parameters
string$textthe text to display
string$styleany CSS classes or inline styles to apply
int$colspanthe colspan for the column
Returns
DataListView returns the current instance, allowing function call chaining for the column definitions.

Definition at line 320 of file data_view.inc.

321  {
322  $this->footerColumns[] = new FooterTextColumn($text, $style, $colspan);
323  return $this;
324  }

◆ footerTotal()

DataListView::footerTotal (   $field,
  $style = "text-align: right",
  $colspan = 1,
  $typeHint = Number 
)

Sums the total for a column.

Parameters
string$fieldthe field to total in the format "{field}"
string$styleany CSS classes or inline styles to apply
int$colspanthe colspan for the column
string$typeHinttype hint for formatting the output
Returns
DataListView returns the current instance, allowing function call chaining for the column definitions.

Definition at line 347 of file data_view.inc.

347  : right", $colspan = 1, $typeHint = Number)
348  {
349  $column = new FooterTotalColumn($field, $template = "", $style, $colspan, $typeHint);
350  $this->footerColumns[] = $column;
351  $this->totalCallbacks[] = array($column, onStartRow);
352 
353  return $this;
354  }

◆ footerValue()

DataListView::footerValue (   $callback,
  $style = "",
  $colspan = 1 
)

Adds a value column to the table footer.

Parameters
callable$callbackCallback function or object method used to calculate the value for this column.
string$styleany CSS classes or inline styles to apply
int$colspanthe colspan for the column
Returns
DataListView returns the current instance, allowing function call chaining for the column definitions.

Definition at line 333 of file data_view.inc.

334  {
335  $this->footerColumns[] = new FooterValueColumn($callback, $style, $colspan);
336  return $this;
337  }

◆ formatIdTag() [1/2]

PagedList::formatIdTag (   $item)

Definition at line 170 of file paged_list.inc.

171  {
172  $pk = $item->getPrimaryKey();
173  return "{$pk}_{$item->get($pk)}";
174  }

◆ formatIdTag() [2/2]

ServerPagedList::formatIdTag (   $item)

Definition at line 302 of file paged_list.inc.

303  {
304  $pk = $item->getPrimaryKey();
305  return "{$pk}_{$item->get($pk)}";
306  }

◆ formatRowId()

DataListView::formatRowId (   $item)

Definition at line 248 of file data_view.inc.

249  {
250  if ($this->rowIdFormat)
251  {
252  return $item->format($this->rowIdFormat);
253  }
254 
255  $pk = $item->getPrimaryKey();
256  return "{$pk}_" . $item->$pk;
257  }

◆ getExcelLink()

DataListView::getExcelLink ( )

Get the Excel Link.

Definition at line 384 of file data_view.inc.

385  {
386  $qs = appendToQueryString(getFullQueryString(), "__excel={$this->id}");
387  return baseURI().$qs;
388  }
baseURI($uri=null)
Returns the base URI for the current script, with the query string removed.
Definition: functions.inc:1582
getFullQueryString($includePOST=true)
Generates a query string containing the values passed to this page.
Definition: functions.inc:1634
appendToQueryString($qs, $params)
Appends the specified parameters to the supplied query string.
Definition: functions.inc:1594

◆ getIcon()

DirectoryTreeControl::getIcon (   $file)

Definition at line 438 of file directory_tree.inc.

439  {
440  $ext = substr($file, strrpos($file, "."));
441  $icon = $this->icons[$ext];
442  trace("getIcon($file) $ext $icon", 4);
443 
444  if (!isset($icon))
445  {
446  $icon = $this->icons["default"];
447  }
448 
449  return $icon;
450  }

◆ getID() [1/2]

DataListView::getID ( )

Implements FacetFilterable.

Definition at line 135 of file data_view.inc.

136  {
137  return $this->id;
138  }

◆ getID() [2/2]

PagedList::getID ( )

Implements FacetFilterable.

Definition at line 73 of file paged_list.inc.

74  {
75  return $this->id;
76  }
$id
The HTML id of the list.
Definition: paged_list.inc:46

◆ PagedList()

PagedList::PagedList (   $items,
  $id = "paged_list",
  $format = null 
)

Creates a new PagedList control.

Parameters
array$itemsthe array of DataItems to be displayed in the list
string$idthe HTML id of the list
mixed$formatThe formatter used to display the list items (either a format string or a callback function or method)

Definition at line 65 of file paged_list.inc.

66  {
67  $this->items = $items;
68  $this->id = $id;
69  $this->format = $format;
70  $this->tagRowCallbacks = array();
71  }
$format
The formatter used to display the list items (either a format string or a callback function or method...
Definition: paged_list.inc:47
$items
The items to be displayed in the list.
Definition: paged_list.inc:45

◆ scrollable()

DataListView::scrollable (   $height = 300,
  $resizable = true 
)

Definition at line 140 of file data_view.inc.

141  {
142  $this->scrollable = true;
143  $this->height = $height;
144  $this->resizable = $resizable;
145  }

◆ selector()

DataListView::selector (   $format = "")

Adds a selector column to the DataListView.

If no format is specified then selection is handled via a checklist box for the list objects' primary keys.

Parameters
string$format(optional) format to use for the selector

Definition at line 230 of file data_view.inc.

231  {
232  if (!$format && count($this->items))
233  {
234  $pk = $this->items[0]->primary_key;
235  $format = "<input type='checkbox' class='checkbox' name='{$pk}[]' id='{$pk}_{{$pk}}' value='{{$pk}}'/>";
236  }
237 
238  if($format == "radio" && count($this->items) ){
239  $pk = $this->items[0]->primary_key;
240  $format = "<input type='radio' class='radio' name='{$pk}[]' id='{$pk}_{{$pk}}' value='{{$pk}}'/>";
241  }
242 
243  $this->column("&nbsp;", $format, false, "text-align: center");
244  $this->selectable = true;
245  return $this;
246  }

◆ setColumnOrder()

DataListView::setColumnOrder (   $order)

Override the column order.

Parameters
array$orderAn array of column titles in the order they are to be displayed

Definition at line 210 of file data_view.inc.

211  {
212  $columnsByTitle = reindexList($this->columns, "title");
213  $columns = array();
214  foreach($order as $title)
215  {
216  if (array_key_exists($title, $columnsByTitle))
217  {
218  $columns[] = $columnsByTitle[$title];
219  }
220  }
221 
222  $this->columns = $columns;
223  }
$columns
The column definitions for the table.
Definition: data_view.inc:57
reindexList($list, $field, $autoPromote=true)
Reindex an indexed or grouped query result by a different field.
Definition: data_item.inc:1898

◆ setID()

DataListView::setID (   $id = null)

Sets the client-side ID for this DataListView.

Parameters
$idstring the ID to use. Passing in null will generate a random ID string.

Definition at line 360 of file data_view.inc.

361  {
362  if ($this->id) return;
363  if ($id)
364  {
365  $this->id = $id;
366  return;
367  }
368 
369  $this->id = makeRandomString(6);
370  }
makeRandomString($len)
Creates a randomized string of characters.
Definition: functions.inc:1735

◆ writeExcelFile()

DataListView::writeExcelFile (   $file)

Writes the data table out as an Excel File.

The file is output with an 'attachment' disposition, which will prompt a save dialog in the client browser.

Parameters
$filethe name of the file to be output.
Returns
Does not return - exits script on completion to prevent corruption of the output file.

Definition at line 839 of file data_view.inc.

840  {
841  $x = ExcelFileWriter::create($file);
842 
843  $c = 0;
844  foreach($this->columns as $column)
845  {
846  $x->writeHeading(0, $c, stripHTMLTags(stripHTML($column->title)));
847  ++$c;
848  }
849 
850  $r = 1;
851  foreach($this->items as $item)
852  {
853  $c = 0;
854  if ($this->onStartRow)
855  {
856  $retval = call_user_func($this->onStartRow, $item);
857  if ($retval === false) continue;
858  }
859 
860  foreach($this->totalCallbacks as $cb)
861  {
862  call_user_func($cb, $item);
863  }
864 
865  foreach($this->columns as $column)
866  {
867  if (is_callable($column->onExport))
868  {
869  $val = call_user_func($column->onExport, $item, $column);
870  }
871  else if ($column->onExport)
872  {
873  $val = $item->format($column->onExport);
874  }
875  else
876  {
877  $val = $column->format($item);
878  }
879 
880  switch($column->typeHint)
881  {
882  case String:
883 
884  $x->writeText($r, $c, stripHTMLTags(stripHTML($val)));
885  break;
886 
887  case Text:
888 
889  $x->writeText($r, $c, stripHTMLTags(stripHTML($val)), true);
890  break;
891 
892  case Number:
893 
894  $x->writeNumber($r, $c, $val);
895  break;
896 
897  case Currency:
898 
899  $val = str_replace(array("$", ","), array("", ""), $val);
900  $x->writeCurrency($r, $c, $val);
901  break;
902 
903  case Percentage:
904 
905  $x->writePercentage($r, $c, $val);
906  break;
907 
908  default:
909 
910  /* JDG 5/11/10 currency export fix */
911  if (preg_match("/^[\\d\\,\\.\\$]+$/", $val))
912  {
913  $val = str_replace(array("$", ","), array("", ""), $val);
914  $x->writeNumber($r, $c, $val);
915  }
916  else
917  {
918  // No HTML required in Excel output
919  $x->writeText($r, $c, stripHTMLTags(stripHTML($val)));
920  }
921  }
922 
923  ++$c;
924  }
925  ++$r;
926  }
927 
928  $c = 0;
929 
930  if ($this->footerColumns)
931  {
932  foreach($this->footerColumns as $column)
933  {
934  $val = $column->format();
935  /* JDG 5/11/10 currency export fix */
936  if (preg_match("/^[\\d\\,\\.]+$/", $val))
937  {
938  $val = str_replace(",", "", $val);
939  $x->writeFooterNumber($r, $c, $val);
940  }
941  else
942  {
943  // No HTML required in Excel output
944  $x->writeFooter($r, $c, stripHTMLTags(stripHTML($val)));
945  }
946  $c += $column->colspan;
947  }
948  }
949 
950  $x->send();
951 
952  session_write_close();
953  exit();
954  }
static create($filename)
Definition: excel.inc:48
stripHTMLTags($text)
Removes all HTML tags from the specified string.
Definition: functions.inc:1491
stripHTML($text)
Definition: functions.inc:847

◆ writeHTML() [1/3]

FileNode::writeHTML ( )

Definition at line 59 of file directory_tree.inc.

60  {
61  $icon_image = $this->_tree->getIcon($this->title);
62  $class = ($this->value == $this->_tree->selectedValue) ? "selected" : "file";
63 ?>
64  <div><img src="<?echo $this->_tree->images['toggle_blank']?>" align="absmiddle"><img src="<?echo $icon_image?>" align="absmiddle"><a id="<?echo $this->id?>_link" class="<?echo $class?>" href="javascript:DirectoryTree.selectItem('<?echo $this->_tree->id?>', '<?echo $this->id?>', '<?echo jsSafe($this->value)?>')" ondblclick="<?echo $this->_tree->id?>_onDoubleClick()"><?echo $this->title?></a></div>
65 <?
66  }

◆ writeHTML() [2/3]

FolderNode::writeHTML ( )

Definition at line 94 of file directory_tree.inc.

95  {
96  ksort($this->children);
97 
98  $c = count($this->children);
99 
100  if ($c == 0)
101  {
102  echo "<div class=\"{$this->leafStyle}\"><img src=\"{$this->_tree->images['toggle_blank']}\" align=\"absmiddle\"><img src=\"{$this->_tree->images['folder_closed']}\" align=\"absbottom\">";
103  // Leaf node
104  if ($this->value)
105  {
106  if ($this->_tree->selectMode == "folder" || $this->_tree->selectMode = "both")
107  {
108  if ($this->_tree->multiSelect)
109  {
110 ?>
111  <input type="checkbox" class="checkbox" name="<? echo $this->id?>" value="<? echo $this->value?>"<? if ($this->checked) echo " checked";?>> <?echo $this->title?>
112 <?
113  }
114  else
115  {
116  $class = ($this->value == $this->_tree->selectedValue) ? "selected" : "folder";
117 ?>
118  <a id="<?echo $this->id?>_link" class="<? echo $class?>" href="javascript:DirectoryTree.selectItem('<?echo $this->_tree->id?>', '<?echo $this->id?>', '<?echo jsSafe($this->value)?>')"><?echo $this->title?></a>
119 <?
120  }
121  }
122  else
123  {
124 ?>
125  <a id="<?echo $this->id?>_link" class="folder" href="" onclick="return false;"><?echo $this->title?></a>
126 <?
127  }
128 
129  }
130 
131  echo "</div>";
132  }
133  else
134  {
135  if ($this->open)
136  {
137  $toggle = $this->_tree->images['toggle_open'];
138  $folder = $this->_tree->images['folder_open'];
139  $display = "block";
140  }
141  else
142  {
143  $toggle = $this->_tree->images['toggle_closed'];
144  $folder = $this->_tree->images['folder_closed'];
145  $display = "none";
146  }
147 ?>
148  <div id='<?echo $this->id?>'><img id="<?echo $this->id?>_toggle" src="<?echo $toggle?>" align="absmiddle" onclick="DirectoryTree.toggleDirectoryFolder('<?echo $this->id?>')"><img id="<?echo $this->id?>_folder" align="absmiddle" src="<?echo $folder?>" onclick="DirectoryTree.toggleDirectoryFolder('<?echo $this->id?>')">
149 <?
150  if ($this->value)
151  {
152  if ($this->_tree->selectMode == "folder" || $this->_tree->selectMode == "both")
153  {
154  if ($this->_tree->multiSelect)
155  {
156 ?>
157  <input type="checkbox" class="checkbox" name="<? echo $this->id?>" value="<? echo $this->value?>"<? if ($this->checked) echo " checked";?>> <?echo $this->title?>
158 <?
159  }
160  else
161  {
162  $class = ($this->value == $this->_tree->selectedValue) ? "selected" : "folder";
163 ?>
164  <a id="<?echo $this->id?>_link" class="folder" href="javascript:DirectoryTree.selectItem('<?echo $this->_tree->id?>', '<?echo $this->id?>', '<?echo jsSafe($this->value)?>')"><?echo $this->title?></a>
165 <?
166  }
167  }
168  else
169  {
170 ?>
171  <a id="<?echo $this->id?>_link" class="folder" href="javascript:DirectoryTree.toggleDirectoryFolder('<?echo $this->id?>')"><?echo $this->title?></a>
172 <?
173  } }
174 ?>
175  </div>
176  <div id='<?echo $this->id?>_contents' style='padding-left: 16px; display: <? echo $display?>'>
177 
178 <?
179  foreach($this->children as $key => $child)
180  {
181  $child->_tree =& $this->_tree;
182  $child->writeHTML();
183  }
184 ?>
185  </div>
186 <?
187  }
188  }

◆ writeHTML() [3/3]

DirectoryTreeControl::writeHTML ( )

Definition at line 390 of file directory_tree.inc.

391  {
392  $width = is_numeric($this->width) ? "{$this->width}px" : $this->width;
393  $height = is_numeric($this->height) ? "{$this->height}px" : $this->height;
394  //ksort($this->children);
395  $this->writeScript();
396 ?>
397  <input type="hidden" name="<?echo $this->id?>_value" id="<?echo $this->id?>_value" value="<?echo $this->selectedValue?>"/>
398  <input type="hidden" name="<?echo $this->id?>_node" id="<?echo $this->id?>_node" value=""/>
399  <table id="<?echo $this->id?>" class="<? echo $this->style?>" style="width: <? echo $width?>;height: <?echo $height?>" cellpadding="0" cellspacing="0">
400  <?
401  if ($this->title)
402  {
403  ?>
404  <tr>
405  <th><? echo $this->title?></th>
406  </tr>
407  <?
408  }
409  ?>
410  <tr>
411  <td>
412  <div style="margin: 0; padding: 0;width: 100%;height: <?echo $height?>;<?if ($this->scroll) echo "overflow: auto"?>">
413 <?
414  $c = count($this->children);
415  foreach($this->children as $key => $child)
416  {
417  trace("Writing $key,{$child->title}", 3);
418  try
419  {
420  $child->_tree =& $this;
421  $child->calculateOpenState();
422  $child->writeHTML();
423  }
424  catch(Error $e)
425  {
426  var_dump($child);
427  throw $e;
428  }
429  }
430 ?>
431  </div>
432  </td>
433  </tr>
434  </table>
435 <?
436  }

◆ writeScript() [1/4]

DataListView::writeScript ( )

Write the Javascript to implement the table output.

Returns
string containing the required Javascript.

Definition at line 412 of file data_view.inc.

413  {
414  $this->setID(); // Set to a default ID if none was specified.
415 
416  if ($_REQUEST["__column_order"])
417  {
418  $this->setColumnOrder(explode("|", $_REQUEST["__column_order"]));
419  }
420 
421  if ($this->excelFile && $_REQUEST["__excel"] == $this->id)
422  {
423  $this->writeExcelFile($this->excelFile);
424  }
425 
426  if (count($this->items) == 0) return;
427 
429  {
430  $script =
431  "\t<script type='text/javascript' src='/fakoli/js/sorting_table.js'></script>\n".
432  "\t<script type='text/javascript' src='/fakoli/js/paginating_table.js'></script>\n".
433  "\t<script type='text/javascript' src='/fakoli/js/filtering_table.js'></script>\n".
434  "\t<script type='text/javascript' src='/fakoli/js/scrolling_table.js'></script>\n";
435 
437  }
438 
439  $constructor = "";
440  if (!$this->sortable && $this->pageSize <= 0 && !$this->filter && !$this->dragReorder)
441  {
442  return "";
443  }
444 
445  $zebra = $this->zebra ? "true" : "false";
446 
447  if ($this->pageSize > 0 AND $this->paginate)
448  {
449  $constructor = "\n\t\tvar {$this->id}_paginator = new PaginatingTable('{$this->id}', '{$this->id}_paginator', {per_page: {$this->pageSize}, zebra: $zebra});";
450  }
451  else
452  {
453  $constructor = "\n\t\tvar {$this->id}_paginator = false;";
454  }
455 
456  if ($this->filter !== false)
457  {
458  $constructor .= "\n\t\tvar {$this->id}_filter = new FilteringTable('{$this->id}', '{$this->id}_filter', {column: {$this->filter}, paginator: {$this->id}_paginator});";
459  }
460  else
461  {
462  $constructor .= "\n\t\tvar {$this->id}_filter = false;";
463  }
464 
465  if ($this->sortable)
466  {
467  $constructor .= "\n\t\tvar {$this->id}_sort = new SortingTable('{$this->id}', { paginator: {$this->id}_paginator, filter: {$this->id}_filter, zebra: $zebra});";
468  }
469 
470  if ($this->selectable)
471  {
472  $constructor .= "\n\t\tdocument.id('{$this->id}').getSelectedValues = function() { var values = []; this.getElements(\"input[type='checkbox']\").each(function(e) { if (e.checked) values.push(e.value); }); return values; };";
473  }
474 
475  if ($this->scrollable)
476  {
477  $constructor .= "\n\t\tnew ScrollingTable('{$this->id}');";
478  }
479 
480  if ($constructor || $this->dragReorder || $this->dragColumnReorder)
481  {
482  $script .= "\t<script type='text/javascript'>\n\twindow.addEvent('domready', function()\n{";
483  $script .= $constructor;
484 
485  if ($this->dragReorder)
486  {
487  $script .= "\n\t\tnew DraggableTable('#{$this->id} tbody', '{$this->reorderHandler}', '{$this->items[0]->primary_key}');";
488  }
489 
490  if ($this->dragColumnReorder)
491  {
492  $options = ($this->columnReorderCallback) ? ", {onColumnsReordered: $this->columnReorderCallback}" : "";
493  $script .= "\n\tnew DraggableColumnTable('{$this->id}'$options);";
494  }
495 
496  $script .= "\n\t});\n\t</script>\n";
497  }
498 
499 
500  if ($this->menu) $script .= $this->menu->writeScript();
501  if ($this->contextMenu) $script .= $this->contextMenu->writeScript();
502 
503  return $script;
504  }
static $includesWritten
Definition: data_view.inc:102
$columnReorderCallback
Javascript callback function that is triggered when columns are reordered.
Definition: data_view.inc:88
setColumnOrder($order)
Override the column order.
Definition: data_view.inc:210
$zebra
Specifies whether alternate rows in the table should be striped.
Definition: data_view.inc:73
writeExcelFile($file)
Writes the data table out as an Excel File.
Definition: data_view.inc:839
setID($id=null)
Sets the client-side ID for this DataListView.
Definition: data_view.inc:360

◆ writeScript() [2/4]

DirectoryTreeControl::writeScript ( )

Definition at line 345 of file directory_tree.inc.

346  {
347  // Event Hooks
348 ?>
349 <script type="text/javascript">
350 function <?echo $this->id?>_onSelectItem(itemID, itemValue)
351 {
352 <?
353  if ($this->onSelectionChanged)
354  {
355 ?>
356  <?echo $this->onSelectionChanged?>(itemID, itemValue);
357 <?
358  }
359 ?>
360 }
361 
362 function <?echo $this->id?>_onClearSelection()
363 {
364 <?
365  if ($this->onSelectionChanged)
366  {
367 ?>
368  <? echo $this->onSelectionChanged?>(null, null);
369 <?
370  }
371 ?>
372 }
373 
374 function <?echo $this->id?>_onDoubleClick(itemID, itemValue)
375 {
376 <?
377  if ($this->onDoubleClick)
378  {
379 ?>
380  <? echo $this->onDoubleClick?>(itemID, itemValue);
381 <?
382  }
383 ?>
384 }
385 
386 </script>
387 <?
388  }

◆ writeScript() [3/4]

PagedList::writeScript ( )

Definition at line 87 of file paged_list.inc.

88  {
89  if(!$this->paginate && count($this->tagRowCallbacks) == 0) return "";
90 
91  ob_start();
92 ?>
93  <script type="text/javascript">
94  window.addEvent('domready', function()
95  {
96  var <?echo $this->id?> = new PaginatingList('<?echo $this->id ?>', '<?echo $this->id?>_paginator', {per_page: <?echo $this->pageSize ?>, display_mode: '<?echo $this->displayMode?>'});
97  });
98  </script>
99 <?
100  $script = ob_get_contents();
101  ob_end_clean();
102  return $script;
103  }

◆ writeScript() [4/4]

ServerPagedList::writeScript ( )

Definition at line 222 of file paged_list.inc.

223  {
224  }

Variable Documentation

◆ $_activeTree

$_activeTree = null

Global reference to currently drawing tree instance.

Definition at line 53 of file tree.inc.

◆ $_writtenDirectoryTreeControlScript

$_writtenDirectoryTreeControlScript = false

Definition at line 38 of file directory_tree.inc.

◆ $_writtenTreeControlScript

$_writtenTreeControlScript = false

This file provides a class-based API for generating expanding tree controls.

Global flag to indicate whether the implement Javascript for the tree control has been written yet for this page output.

Definition at line 48 of file tree.inc.

◆ $checked

FolderNode::$checked

Definition at line 77 of file directory_tree.inc.

◆ $children [1/2]

FolderNode::$children = array()

Definition at line 72 of file directory_tree.inc.

◆ $children [2/2]

DirectoryTreeControl::$children

Definition at line 247 of file directory_tree.inc.

◆ $closedStyle

FolderNode::$closedStyle

Definition at line 78 of file directory_tree.inc.

◆ $columnReorderCallback

DataListView::$columnReorderCallback = null

Javascript callback function that is triggered when columns are reordered.

Definition at line 88 of file data_view.inc.

◆ $columns

DataListView::$columns

The column definitions for the table.

Definition at line 57 of file data_view.inc.

◆ $commandMenuIcon

DataListView::$commandMenuIcon = "/fakoli/images/data_view_menu.png"

Icon to use for the command menu dropdown.

Definition at line 100 of file data_view.inc.

◆ $contextMenu

DataListView::$contextMenu = null

Right-click context menu for selection based operations.

Definition at line 99 of file data_view.inc.

◆ $cssClass

DataListView::$cssClass

Optional CSS class to apply to the table.

Definition at line 59 of file data_view.inc.

◆ $CSSclass [1/2]

PagedList::$CSSclass = null

CSS class(es) to be applied to the list.

Definition at line 50 of file paged_list.inc.

◆ $CSSclass [2/2]

ServerPagedList::$CSSclass = null

CSS class(es) to be applied to the list.

Definition at line 207 of file paged_list.inc.

◆ $cssStyle

DataListView::$cssStyle

Optional additional inline styles to apply to the table.

Definition at line 63 of file data_view.inc.

◆ $displayMode

PagedList::$displayMode = "list-item"

CSS display type for visible items.

Definition at line 57 of file paged_list.inc.

◆ $dragColumnReorder

DataListView::$dragColumnReorder = false

Enable drag & drop column reordering and show/hide capabilities.

Definition at line 87 of file data_view.inc.

◆ $dragReorder

DataListView::$dragReorder = false

Enabled drag & drop reordering.

Definition at line 85 of file data_view.inc.

◆ $dragText

DataListView::$dragText = ""

Optional text to display above reorderable table.

Definition at line 93 of file data_view.inc.

◆ $emptyList [1/2]

PagedList::$emptyList = "No items in the list"

Message to display when the list is empty.

Definition at line 52 of file paged_list.inc.

◆ $emptyList [2/2]

ServerPagedList::$emptyList = "No items in the list"

Message to display when the list is empty.

Definition at line 209 of file paged_list.inc.

◆ $emptyMessage

DataListView::$emptyMessage

Message to display when no items are present in the data set.

Definition at line 64 of file data_view.inc.

◆ $excelFile

DataListView::$excelFile

Filename for automatic Excel export.

Definition at line 70 of file data_view.inc.

◆ $filter

DataListView::$filter

Specifies whether to enable client-side filtering for this table.

Definition at line 69 of file data_view.inc.

◆ $footerColumns

DataListView::$footerColumns

The footer column definitions for the table.

Definition at line 58 of file data_view.inc.

◆ $format [1/2]

PagedList::$format

The formatter used to display the list items (either a format string or a callback function or method)

Definition at line 47 of file paged_list.inc.

◆ $format [2/2]

ServerPagedList::$format

Definition at line 204 of file paged_list.inc.

◆ $height [1/2]

DataListView::$height

Definition at line 77 of file data_view.inc.

◆ $height [2/2]

DirectoryTreeControl::$height

Definition at line 241 of file directory_tree.inc.

◆ $hideExcelIcon

DataListView::$hideExcelIcon = false

Suppress the automatic Excel icon if you want an external link.

Definition at line 89 of file data_view.inc.

◆ $icons

DirectoryTreeControl::$icons
Initial value:
= array( ".doc" => "/fakoli/images/msword_icon.png",
".docx" => "/fakoli/images/msword_icon.png",
".xls" => "/fakoli/images/msexcel_icon.png",
".xlsx" => "/fakoli/images/msexcel_icon.png",
".pdf" => "/fakoli/images/pdf_icon.png",
".ppt" => "/fakoli/images/ppt_icon.png",
".pptx" => "/fakoli/images/ppt_icon.png",
".gif" => "/fakoli/images/image_icon.png",
".png" => "/fakoli/images/image_icon.png",
".jpg" => "/fakoli/images/image_icon.png",
"default" => "/fakoli/images/file_icon.png")

Definition at line 255 of file directory_tree.inc.

◆ $id [1/6]

DataListView::$id

ID of the table in the output script.

Definition at line 60 of file data_view.inc.

◆ $id [2/6]

FileNode::$id

Definition at line 42 of file directory_tree.inc.

◆ $id [3/6]

FolderNode::$id

Definition at line 74 of file directory_tree.inc.

◆ $id [4/6]

DirectoryTreeControl::$id

Definition at line 236 of file directory_tree.inc.

◆ $id [5/6]

PagedList::$id

The HTML id of the list.

Definition at line 46 of file paged_list.inc.

◆ $id [6/6]

ServerPagedList::$id

Definition at line 203 of file paged_list.inc.

◆ $images

DirectoryTreeControl::$images
Initial value:
= array("toggle_open" => "/fakoli/images/toggle_open.png",
"toggle_closed" => "/fakoli/images/toggle_closed.png",
"toggle_blank" => "/fakoli/images/toggle_blank.png",
"folder_open" => "/fakoli/images/folder_open.png",
"folder_closed" => "/fakoli/images/folder_closed.png",
"generic_file" => "/fakoli/images/file.png")

Definition at line 248 of file directory_tree.inc.

◆ $includesWritten

DataListView::$includesWritten = false
static

Definition at line 102 of file data_view.inc.

◆ $items [1/2]

PagedList::$items

The items to be displayed in the list.

Definition at line 45 of file paged_list.inc.

◆ $items [2/2]

ServerPagedList::$items

Definition at line 202 of file paged_list.inc.

◆ $listTag [1/2]

PagedList::$listTag = "ul"

The HTML list tag type.

Definition at line 49 of file paged_list.inc.

◆ $listTag [2/2]

ServerPagedList::$listTag = "ul"

The HTML list tag type.

Definition at line 206 of file paged_list.inc.

◆ $menu

DataListView::$menu = null

Command menu for selection-based operations.

Definition at line 98 of file data_view.inc.

◆ $multiSelect

DirectoryTreeControl::$multiSelect = false

Definition at line 244 of file directory_tree.inc.

◆ $onDrawfooter

DataListView::$onDrawfooter

Callback hook that gets called after all rows have been drawn.

Definition at line 66 of file data_view.inc.

◆ $onRowClick

DataListView::$onRowClick = null

Javascript callback function that is triggered with a row is clicked.

Definition at line 90 of file data_view.inc.

◆ $onRowHover

DataListView::$onRowHover = null

Javascript callback function that is triggered with a row is hovered over.

Definition at line 91 of file data_view.inc.

◆ $onStartRow [1/2]

DataListView::$onStartRow

Callback hook that gets called at the start of each row.

Definition at line 65 of file data_view.inc.

◆ $onStartRow [2/2]

PagedList::$onStartRow

Callback for setting the CSS class / visibility of each item in the list.

Definition at line 56 of file paged_list.inc.

◆ $open

FolderNode::$open

Definition at line 80 of file directory_tree.inc.

◆ $openStyle

FolderNode::$openStyle

Definition at line 79 of file directory_tree.inc.

◆ $page

ServerPagedList::$page = -1

Definition at line 211 of file paged_list.inc.

◆ $pageSize [1/3]

DataListView::$pageSize

Specifies the number of items per page - set to zero for unpaginated.

Definition at line 62 of file data_view.inc.

◆ $pageSize [2/3]

PagedList::$pageSize = 10

The number of items per page.

Definition at line 48 of file paged_list.inc.

◆ $pageSize [3/3]

ServerPagedList::$pageSize = 10

The number of items per page.

Definition at line 205 of file paged_list.inc.

◆ $paginate [1/3]

DataListView::$paginate = true

Specifies whether table should be paginated (false for view only pages)

Definition at line 71 of file data_view.inc.

◆ $paginate [2/3]

PagedList::$paginate = true

Specifies whether list should be paginated (false for view only pages)

Definition at line 53 of file paged_list.inc.

◆ $paginate [3/3]

ServerPagedList::$paginate = true

Specifies whether list should be paginated.

Definition at line 210 of file paged_list.inc.

◆ $reorderHandler

DataListView::$reorderHandler = null

Handler script that implements reordering records.

Definition at line 86 of file data_view.inc.

◆ $resizable

DataListView::$resizable = true

Definition at line 79 of file data_view.inc.

◆ $rowId

DataListView::$rowId = false

whether to include an id tag for each tr row

Definition at line 83 of file data_view.inc.

◆ $rowIdFormat

DataListView::$rowIdFormat = null

Optionally specify a custom row ID format.

Definition at line 84 of file data_view.inc.

◆ $scroll

DirectoryTreeControl::$scroll

Definition at line 239 of file directory_tree.inc.

◆ $scrollable

DataListView::$scrollable = false

Definition at line 78 of file data_view.inc.

◆ $selectable

DataListView::$selectable = false

Whether the table provides a selection mechanism.

Definition at line 96 of file data_view.inc.

◆ $selectedValue

DirectoryTreeControl::$selectedValue

Definition at line 243 of file directory_tree.inc.

◆ $selectMode

DirectoryTreeControl::$selectMode = "folder"

Definition at line 245 of file directory_tree.inc.

◆ $showFiles

DirectoryTreeControl::$showFiles = true

Definition at line 242 of file directory_tree.inc.

◆ $showSelectAll

DataListView::$showSelectAll = false

Show Select All button for selectable tables.

Definition at line 97 of file data_view.inc.

◆ $sortable

DataListView::$sortable

Specifies whether to enable client-side sorting for this table.

Definition at line 61 of file data_view.inc.

◆ $style

DirectoryTreeControl::$style

Definition at line 238 of file directory_tree.inc.

◆ $styles [1/2]

PagedList::$styles = null

Specific CSS styles to be applied to the list.

Definition at line 51 of file paged_list.inc.

◆ $styles [2/2]

ServerPagedList::$styles = null

Specific CSS styles to be applied to the list.

Definition at line 208 of file paged_list.inc.

◆ $summary

DataListView::$summary

Human-readable summary of the information contained in the table (for usability/accessiblity purposes)

Definition at line 72 of file data_view.inc.

◆ $tagRowCallbacks [1/2]

DataListView::$tagRowCallbacks

Array of callbacks for adding extra attributes to each row.

Definition at line 67 of file data_view.inc.

◆ $tagRowCallbacks [2/2]

PagedList::$tagRowCallbacks

Array of callbacks for adding extra attributes to each row.

Definition at line 55 of file paged_list.inc.

◆ $title [1/3]

FileNode::$title

Definition at line 43 of file directory_tree.inc.

◆ $title [2/3]

FolderNode::$title

Definition at line 75 of file directory_tree.inc.

◆ $title [3/3]

DirectoryTreeControl::$title

Definition at line 237 of file directory_tree.inc.

◆ $toolbarCallbacks

DataListView::$toolbarCallbacks = array()

Override this callback to add toolbar links into the first header cell.

Definition at line 101 of file data_view.inc.

◆ $totalCallbacks

DataListView::$totalCallbacks

Array of callbacks for totalling columns.

Definition at line 68 of file data_view.inc.

◆ $value [1/2]

FileNode::$value

Definition at line 44 of file directory_tree.inc.

◆ $value [2/2]

FolderNode::$value

Definition at line 76 of file directory_tree.inc.

◆ $width

DirectoryTreeControl::$width

Definition at line 240 of file directory_tree.inc.

◆ $writeIdTag [1/2]

PagedList::$writeIdTag = false

whether to include an id tag for each li item

Definition at line 54 of file paged_list.inc.

◆ $writeIdTag [2/2]

ServerPagedList::$writeIdTag = false

whether to include an id tag for each li item

Definition at line 212 of file paged_list.inc.

◆ $zebra

DataListView::$zebra

Specifies whether alternate rows in the table should be striped.

Definition at line 73 of file data_view.inc.