Framework  3.9
DataGroup Class Reference

Represents a grouped collection of data within a table. More...

+ Inheritance diagram for DataGroup:

Public Member Functions

 DataGroup ($parent, $title, $key, $expanded=false, $fixed=false)
 Creates a new DataGroup. More...
 
 draw ()
 Draws the data group subheading within the table. More...
 

Public Attributes

 $parent
 The parent GroupedDataListView object. More...
 
 $title
 The text to display in the title for this data group. More...
 
 $key
 The key value for this data group. More...
 
 $expanded
 Boolean indicating whether this group should initially be expanded. More...
 
 $fixed
 Specifies whether this group should be fixed (i.e. exempt from expand/collapse toggling). More...
 

Detailed Description

Represents a grouped collection of data within a table.

Author
andy

Definition at line 45 of file grouped_data_view.inc.

Member Function Documentation

◆ DataGroup()

DataGroup::DataGroup (   $parent,
  $title,
  $key,
  $expanded = false,
  $fixed = false 
)

Creates a new DataGroup.

Parameters
$parentthe parent table
$titleThe text to display in the title for this data group
$keyThe key value for this data group
$expandedBoolean indicating whether this group should initially be expanded.
$fixedSpecifies whether this group should be fixed (i.e. exempt from expand/collapse toggling).

Definition at line 61 of file grouped_data_view.inc.

62  {
63  $this->parent = $parent;
64  $this->title = $title;
65  $this->key = $key;
66  $this->expanded = $expanded;
67  }
$key
The key value for this data group.
$title
The text to display in the title for this data group.
$expanded
Boolean indicating whether this group should initially be expanded.
$parent
The parent GroupedDataListView object.

◆ draw()

DataGroup::draw ( )

Draws the data group subheading within the table.

Reimplemented in GroupedListGroup.

Definition at line 72 of file grouped_data_view.inc.

73  {
74  $cssClass = ($this->fixed || $this->parent->mode == 'fixed') ? "fixed" : ($this->expanded) ? "expanded" : "collapsed";
75  $select = ($this->parent->selectable && $this->parent->showSelectAll) ? "<a href='#' class='button' style='float: right' onclick='new DOMEvent(event).stop(); GroupingTable.toggleGroup(this, \"{$this->parent->groupClass}\"); return false;'>Select All</a>" : "";
76 ?>
77  <tr class="<?echo $this->parent->groupClass?> <?echo $cssClass?>">
78  <td colspan="<?echo $this->parent->columnCount?>"><?echo $select?><?echo $this->title?></td>
79  </tr>
80 <?
81  }

Member Data Documentation

◆ $expanded

DataGroup::$expanded

Boolean indicating whether this group should initially be expanded.

Definition at line 50 of file grouped_data_view.inc.

◆ $fixed

DataGroup::$fixed

Specifies whether this group should be fixed (i.e. exempt from expand/collapse toggling).

Definition at line 51 of file grouped_data_view.inc.

◆ $key

DataGroup::$key

The key value for this data group.

Definition at line 49 of file grouped_data_view.inc.

◆ $parent

DataGroup::$parent

The parent GroupedDataListView object.

Definition at line 47 of file grouped_data_view.inc.

◆ $title

DataGroup::$title

The text to display in the title for this data group.

Definition at line 48 of file grouped_data_view.inc.


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