Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/db/dblist.php
Show First 20 Lines • Show All 654 Lines • ▼ Show 20 Line(s) | |||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
/** | /** | ||||
* Returns previously calculated total (formatted) | * Returns previously calculated total (formatted) | ||||
* | * | ||||
* @param string $field | * @param string $field Field. | ||||
* @param string $total_function | * @param string $total_function Total function. | ||||
* @param string $format Format. | |||||
* | |||||
* @return float | * @return float | ||||
* @access public | |||||
*/ | */ | ||||
function GetFormattedTotal($field, $total_function) | public function GetFormattedTotal($field, $total_function, $format = null) | ||||
{ | { | ||||
$res = $this->getTotal($field, $total_function); | $res = $this->getTotal($field, $total_function); | ||||
$formatter_class = $this->GetFieldOption($field, 'formatter'); | $formatter_class = $this->GetFieldOption($field, 'formatter'); | ||||
if ( $formatter_class ) { | if ( $formatter_class ) { | ||||
/** @var kFormatter $formatter */ | /** @var kFormatter $formatter */ | ||||
$formatter = $this->Application->recallObject($formatter_class); | $formatter = $this->Application->recallObject($formatter_class); | ||||
$res = $formatter->Format($res, $field, $this); | $res = $formatter->Format($res, $field, $this, $format); | ||||
} | } | ||||
return $res; | return $res; | ||||
} | } | ||||
/** | /** | ||||
* Builds full select query except for LIMIT clause | * Builds full select query except for LIMIT clause | ||||
* | * | ||||
▲ Show 20 Lines • Show All 1084 Lines • Show Last 20 Lines |