Commit 3ad40a3e authored by alexpott's avatar alexpott
Browse files

Issue #2002986 by jastraat, rjleigh, tvlooy, Dan Reinders: Rename Views method...

Issue #2002986 by jastraat, rjleigh, tvlooy, Dan Reinders: Rename Views method summary_name() to summaryName().
parent 022531af
......@@ -61,7 +61,7 @@ public function buildOptionsForm(&$form, &$form_state) {
);
}
function summary_name($data) {
public function summaryName($data) {
$value = $data->{$this->name_alias};
// If the list element has a human readable name show it,
if (isset($this->allowed_values[$value]) && !empty($this->options['summary']['human'])) {
......
......@@ -63,7 +63,7 @@ public function buildOptionsForm(&$form, &$form_state) {
}
function summary_name($data) {
public function summaryName($data) {
$value = $data->{$this->name_alias};
// If the list element has a human readable name show it,
if (isset($this->allowed_values[$value]) && !empty($this->options['summary']['human'])) {
......
......@@ -20,16 +20,16 @@
class LanguageArgument extends ArgumentPluginBase {
/**
* Overrides \Drupal\views\Plugin\views\argument\ArgumentPluginBase::summary_name().
* Overrides \Drupal\views\Plugin\views\argument\ArgumentPluginBase::summaryName().
*
* Gets the user-friendly version of the language name.
*/
function summary_name($data) {
public function summaryName($data) {
return $this->language($data->{$this->name_alias});
}
/**
* Overrides \Drupal\views\Plugin\views\argument\ArgumentPluginBase::summary_name().
* Overrides \Drupal\views\Plugin\views\argument\ArgumentPluginBase::summaryName().
*
* Gets the user friendly version of the language name for display as a
* title placeholder.
......
......@@ -18,10 +18,10 @@
class Type extends String {
/**
* Override the behavior of summary_name(). Get the user friendly version
* Override the behavior of summaryName(). Get the user friendly version
* of the node type.
*/
function summary_name($data) {
public function summaryName($data) {
return $this->node_type($data->{$this->name_alias});
}
......
......@@ -895,7 +895,7 @@ function summary_argument($data) {
* @param $data
* The query results for the row.
*/
function summary_name($data) {
public function summaryName($data) {
$value = $data->{$this->name_alias};
if (empty($value) && !empty($this->definition['empty field name'])) {
$value = $this->definition['empty field name'];
......
......@@ -29,7 +29,7 @@ class DayDate extends Date {
/**
* Provide a link to the next level of the view
*/
function summary_name($data) {
public function summaryName($data) {
$day = str_pad($data->{$this->name_alias}, 2, '0', STR_PAD_LEFT);
// strtotime respects server timezone, so we need to set the time fixed as utc time
return format_date(strtotime("2005" . "05" . $day . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
......
......@@ -29,7 +29,7 @@ class FullDate extends Date {
/**
* Provide a link to the next level of the view
*/
function summary_name($data) {
public function summaryName($data) {
$created = $data->{$this->name_alias};
return format_date(strtotime($created . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
}
......
......@@ -29,7 +29,7 @@ class MonthDate extends Date {
/**
* Provide a link to the next level of the view
*/
function summary_name($data) {
public function summaryName($data) {
$month = str_pad($data->{$this->name_alias}, 2, '0', STR_PAD_LEFT);
return format_date(strtotime("2005" . $month . "15" . " 00:00:00 UTC" ), 'custom', $this->format, 'UTC');
}
......
......@@ -288,8 +288,8 @@ function title_query() {
return drupal_map_assoc($this->value, 'check_plain');
}
function summary_name($data) {
return $this->caseTransform(parent::summary_name($data), $this->options['case']);
public function summaryName($data) {
return $this->caseTransform(parent::summaryName($data), $this->options['case']);
}
}
......@@ -24,7 +24,7 @@ class WeekDate extends Date {
/**
* Provide a link to the next level of the view
*/
function summary_name($data) {
public function summaryName($data) {
$created = $data->{$this->name_alias};
return t('Week @week', array('@week' => $created));
}
......
......@@ -29,7 +29,7 @@ class YearMonthDate extends Date {
/**
* Provide a link to the next level of the view
*/
function summary_name($data) {
public function summaryName($data) {
$created = $data->{$this->name_alias};
return format_date(strtotime($created . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
}
......
......@@ -438,7 +438,7 @@ function template_preprocess_views_view_summary(&$vars) {
$argument->process_summary_arguments($row_args);
foreach ($vars['rows'] as $id => $row) {
$vars['rows'][$id]->link = $argument->summary_name($row);
$vars['rows'][$id]->link = $argument->summaryName($row);
$args = $view->args;
$args[$argument->position] = $row_args[$id];
......@@ -502,7 +502,7 @@ function template_preprocess_views_view_summary_unformatted(&$vars) {
if ($count++) {
$vars['rows'][$id]->separator = filter_xss_admin($vars['options']['separator']);
}
$vars['rows'][$id]->link = $argument->summary_name($row);
$vars['rows'][$id]->link = $argument->summaryName($row);
$args = $view->args;
$args[$argument->position] = $row_args[$id];
......
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