|
| __construct ($class, $title="", $request=null, $outputFilter=false) |
|
| __sleep () |
|
| __wakeup () |
|
| load ($request) |
|
| getFields () |
|
| column ($title, $format, $sortable=true, $style="", $type=null, $outputFields=null) |
|
| excludeKeyFromJoin ($key) |
|
| getTitle () |
|
| searchFields () |
|
| favoriteColumns () |
|
| additionalConstraints ($constraint) |
|
| getConstraint ($first, $request) |
|
| configureForm ($configurator=null) |
|
| footerText ($text="", $style="") |
| Adds a text column to the table footer. More...
|
|
| footerValue ($title, $callback, $style="") |
| Adds a value column to the table footer. More...
|
|
| footerTotal ($title, $field, $style="text-align: right") |
| Sums the total for a column. More...
|
|
| createJoin ($mgr) |
|
| filterOutput ($mgr, $class) |
|
| createColumns ($mgr, $report) |
|
Definition at line 528 of file report_manager.inc.
◆ __construct()
ReportTable::__construct |
( |
|
$class, |
|
|
|
$title = "" , |
|
|
|
$request = null , |
|
|
|
$outputFilter = false |
|
) |
| |
Definition at line 544 of file report_manager.inc.
547 $this->proto =
new $class;
551 $this->outputFilter =
new InclusionFilter();
552 $this->outputFilter->add($this->proto->getPrimaryKey());
555 $this->fields = array();
559 if ($request) $this->proto->fromDataSet($request);
561 $this->form =
new SearchForm($this->proto);
562 $this->form->id =
"custom_report";
565 $this->params = $this->form->params;
567 $this->excludedKeys = array();
◆ __sleep()
Definition at line 573 of file report_manager.inc.
575 return array(
'class',
'fields',
'title',
'constraints',
'params',
'excludedKeys',
'columns',
'footerColumns',
'totalCallbacks');
◆ __wakeup()
ReportTable::__wakeup |
( |
| ) |
|
◆ additionalConstraints()
ReportTable::additionalConstraints |
( |
|
$constraint | ) |
|
◆ column()
ReportTable::column |
( |
|
$title, |
|
|
|
$format, |
|
|
|
$sortable = true , |
|
|
|
$style = "" , |
|
|
|
$type = null , |
|
|
|
$outputFields = null |
|
) |
| |
◆ configureForm()
ReportTable::configureForm |
( |
|
$configurator = null | ) |
|
◆ createColumns()
ReportTable::createColumns |
( |
|
$mgr, |
|
|
|
$report |
|
) |
| |
Definition at line 757 of file report_manager.inc.
759 foreach($this->
columns as $column)
761 if (
$mgr->isColumnSelected($column))
763 $report->column($column->title, $column->format, $column->sortable, $column->style, $column->type);
765 if(array_key_exists($column->title, $this->footerColumns))
767 $footer = $this->footerColumns[$column->title];
768 $report->footerColumns[] = $footer;
769 if(get_class($footer) == FooterTotalColumn)
776 $report->footerColumns[] =
new FooterTextColumn(
" ");
◆ createJoin()
ReportTable::createJoin |
( |
|
$mgr | ) |
|
Definition at line 727 of file report_manager.inc.
729 $mgr->join->add($this->
class);
732 foreach($this->excludedKeys as $excluded)
734 $mgr->join->excludeKeyFromJoin($this->
class, $excluded);
filterOutput($mgr, $class)
◆ excludeKeyFromJoin()
ReportTable::excludeKeyFromJoin |
( |
|
$key | ) |
|
◆ favoriteColumns()
ReportTable::favoriteColumns |
( |
| ) |
|
Definition at line 635 of file report_manager.inc.
637 $args = func_get_args();
638 $favorites = array_combine($args, $args);
639 foreach($this->
columns as $column)
641 if (array_key_exists($column->title, $favorites))
643 $column->favorite =
true;
◆ filterOutput()
ReportTable::filterOutput |
( |
|
$mgr, |
|
|
|
$class |
|
) |
| |
Definition at line 738 of file report_manager.inc.
740 if ($this->outputFilter)
742 foreach($this->
columns as $column)
744 if (
$mgr->isColumnSelected($column) && is_array($column->outputFields))
746 foreach($column->outputFields as
$field)
748 $this->outputFilter->add(
$field);
753 $mgr->join->setFilter(
$class, $this->outputFilter);
◆ footerText()
ReportTable::footerText |
( |
|
$text = "" , |
|
|
|
$style = "" |
|
) |
| |
Adds a text column to the table footer.
- Parameters
-
$title | the title of the columnn under which the footer value should be displayed |
$text | the text to display |
$style | any CSS classes or inline styles to apply |
- Returns
- ReportManager returns the current instance, allowing function call chaining for the column definitions.
Definition at line 689 of file report_manager.inc.
691 $column =
new ReportFooterColumn(
$title,
$text,
"", $style);
692 $this->footerColumns[
$title] = $column;
◆ footerTotal()
ReportTable::footerTotal |
( |
|
$title, |
|
|
|
$field, |
|
|
|
$style = "text-align: right" |
|
) |
| |
Sums the total for a column.
- Parameters
-
$title | the title of the columnn under which the footer value should be displayed |
$field | the field to total in the format "{field}" |
$style | any CSS classes or inline styles to apply |
- Returns
- DataListView returns the current instance, allowing function call chaining for the column definitions.
Definition at line 719 of file report_manager.inc.
721 $column = new FooterTotalColumn($field, $template = "", $style);
722 $this->footerColumns[$title] = $column;
◆ footerValue()
ReportTable::footerValue |
( |
|
$title, |
|
|
|
$callback, |
|
|
|
$style = "" |
|
) |
| |
Adds a value column to the table footer.
- Parameters
-
$title | the title of the columnn under which the footer value should be displayed |
$callback | Callback function or object method used to calculate the value for this column. |
$style | any CSS classes or inline styles to apply |
- Returns
- ReportManager returns the current instance, allowing function call chaining for the column definitions.
Definition at line 704 of file report_manager.inc.
706 $column =
new FooterValueColumn($callback, $style);
707 $this->footerColumns[
$title] = $column;
◆ getConstraint()
ReportTable::getConstraint |
( |
|
$first, |
|
|
|
$request |
|
) |
| |
Definition at line 657 of file report_manager.inc.
659 $this->params->fromArray($request);
660 $constraint = $this->params->generateConstraint($first);
662 if ($this->constraints)
670 $constraint .= ($first ?
"WHERE " :
" AND ").$this->constraints;
◆ getFields()
ReportTable::getFields |
( |
| ) |
|
◆ getTitle()
ReportTable::getTitle |
( |
| ) |
|
◆ load()
ReportTable::load |
( |
|
$request | ) |
|
Definition at line 584 of file report_manager.inc.
588 $this->proto->fromDataSet($request);
589 $this->params->fromArray($request);
590 $this->form->params->fromArray($request);
◆ searchFields()
ReportTable::searchFields |
( |
| ) |
|
Definition at line 616 of file report_manager.inc.
618 $filter =
new InclusionFilter();
619 for($i = 0; $i < func_num_args(); ++$i)
622 $fieldMode = func_get_arg($i);
623 list(
$field, $searchMode) = explode(
":", $fieldMode);
627 $this->form->setMatchingMode($searchMode,
$field);
631 $this->proto->filter =
$filter;
◆ $class
◆ $columns
ReportTable::$columns = array() |
◆ $constraints
ReportTable::$constraints |
◆ $excludedKeys
ReportTable::$excludedKeys |
◆ $fields
◆ $footerColumns
ReportTable::$footerColumns = array() |
◆ $form
◆ $help
◆ $outputFilter
ReportTable::$outputFilter = null |
◆ $params
◆ $proto
◆ $title
◆ $totalCallbacks
ReportTable::$totalCallbacks = array() |
The documentation for this class was generated from the following file: