Commit b06ef6d1 authored by alexpott's avatar alexpott
Browse files

Issue #2002892 by toddtomlinson, jeroen12345, tvlooy: Rename Views method...

Issue #2002892 by toddtomlinson, jeroen12345, tvlooy: Rename Views method get_aggregation_info() to getAggregationInfo().
parent cf185eac
......@@ -185,7 +185,7 @@ public function getField($field = NULL) {
if ($this->view->display_handler->useGroupBy()) {
$this->view->initQuery();
if ($this->query) {
$info = $this->query->get_aggregation_info();
$info = $this->query->getAggregationInfo();
if (!empty($info[$this->options['group_type']]['method'])) {
$method = $info[$this->options['group_type']]['method'];
if (method_exists($this->query, $method)) {
......@@ -322,7 +322,7 @@ public function buildGroupByForm(&$form, &$form_state) {
$form['#section'] = $display_id . '-' . $type . '-' . $id;
$this->view->initQuery();
$info = $this->view->query->get_aggregation_info();
$info = $this->view->query->getAggregationInfo();
foreach ($info as $id => $aggregate) {
$group_types[$id] = $aggregate['title'];
}
......@@ -864,7 +864,7 @@ public function submitTemporaryForm($form, &$form_state) {
if (empty($executable->query)) {
$executable->initQuery();
}
$aggregate = $executable->query->get_aggregation_info();
$aggregate = $executable->query->getAggregationInfo();
if (!empty($aggregate[$item['group_type']]['handler'][$type])) {
$override = $aggregate[$item['group_type']]['handler'][$type];
}
......
......@@ -878,7 +878,7 @@ public function getHandlers($type) {
if (empty($this->view->query)) {
$this->view->initQuery();
}
$aggregate = $this->view->query->get_aggregation_info();
$aggregate = $this->view->query->getAggregationInfo();
if (!empty($aggregate[$info['group_type']]['handler'][$type])) {
$override = $aggregate[$info['group_type']]['handler'][$type];
}
......@@ -1191,7 +1191,7 @@ public function optionsSummary(&$categories, &$options) {
}
$this->view->initQuery();
if ($this->view->query->get_aggregation_info()) {
if ($this->view->query->getAggregationInfo()) {
$options['group_by'] = array(
'category' => 'other',
'title' => t('Use aggregation'),
......
......@@ -86,7 +86,7 @@ public function addSignature(ViewExecutable $view) { }
*
* If NULL, aggregation is not allowed.
*/
function get_aggregation_info() { }
public function getAggregationInfo() { }
public function validateOptionsForm(&$form, &$form_state) { }
......
......@@ -1204,7 +1204,7 @@ function compile_fields($query) {
}
if (!empty($field['function'])) {
$info = $this->get_aggregation_info();
$info = $this->getAggregationInfo();
if (!empty($info[$field['function']]['method']) && is_callable(array($this, $info[$field['function']]['method']))) {
$string = $this::$info[$field['function']]['method']($field['function'], $string);
$placeholders = !empty($field['placeholders']) ? $field['placeholders'] : array();
......@@ -1647,7 +1647,7 @@ public function addSignature(ViewExecutable $view) {
$view->query->add_field(NULL, "'" . $view->storage->id() . ':' . $view->current_display . "'", 'view_name');
}
function get_aggregation_info() {
public function getAggregationInfo() {
// @todo -- need a way to get database specific and customized aggregation
// functions into here.
return array(
......
......@@ -217,7 +217,7 @@ public function submitForm(array &$form, array &$form_state) {
if (empty($executable->query)) {
$executable->initQuery();
}
$aggregate = $executable->query->get_aggregation_info();
$aggregate = $executable->query->getAggregationInfo();
if (!empty($aggregate[$item['group_type']]['handler'][$type])) {
$override = $aggregate[$item['group_type']]['handler'][$type];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment