diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php b/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php index 67b1004..99a4155 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php @@ -143,19 +143,19 @@ function render($row) { // Create the RSS item object. $item = new \stdClass(); - $item->title = $this->get_field($row_index, $this->options['title_field']); - $item->link = url($this->get_field($row_index, $this->options['link_field']), array('absolute' => TRUE)); - $item->description = $this->get_field($row_index, $this->options['description_field']); + $item->title = $this->getField($row_index, $this->options['title_field']); + $item->link = url($this->getField($row_index, $this->options['link_field']), array('absolute' => TRUE)); + $item->description = $this->getField($row_index, $this->options['description_field']); $item->elements = array( - array('key' => 'pubDate', 'value' => $this->get_field($row_index, $this->options['date_field'])), + array('key' => 'pubDate', 'value' => $this->getField($row_index, $this->options['date_field'])), array( 'key' => 'dc:creator', - 'value' => $this->get_field($row_index, $this->options['creator_field']), + 'value' => $this->getField($row_index, $this->options['creator_field']), 'namespace' => array('xmlns:dc' => 'http://purl.org/dc/elements/1.1/'), ), ); $guid_is_permalink_string = 'false'; - $item_guid = $this->get_field($row_index, $this->options['guid_field_options']['guid_field']); + $item_guid = $this->getField($row_index, $this->options['guid_field_options']['guid_field']); if ($this->options['guid_field_options']['guid_field_is_permalink']) { $guid_is_permalink_string = 'true'; $item_guid = url($item_guid, array('absolute' => TRUE)); @@ -187,15 +187,15 @@ function render($row) { * Retrieves a views field value from the style plugin. * * @param $index - * The index count of the row as expected by views_plugin_style::get_field(). + * The index count of the row as expected by views_plugin_style::getField(). * @param $field_id * The ID assigned to the required field in the display. */ - function get_field($index, $field_id) { + function getField($index, $field_id) { if (empty($this->view->style_plugin) || !is_object($this->view->style_plugin) || empty($field_id)) { return ''; } - return $this->view->style_plugin->get_field($index, $field_id); + return $this->view->style_plugin->getField($index, $field_id); } } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php index 2fe7cfa..ce39ce7 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php @@ -76,7 +76,7 @@ * Stores the rendered field values, keyed by the row index and field name. * * @see \Drupal\views\Plugin\views\style\StylePluginBase::render_fields() - * @see \Drupal\views\Plugin\views\style\StylePluginBase::get_field() + * @see \Drupal\views\Plugin\views\style\StylePluginBase::getField() * * @var array|null */ @@ -546,7 +546,7 @@ function render_grouping($records, $groupings = array(), $group_rendered = NULL) // we can control any special formatting of the grouping field through // the admin or theme layer or anywhere else we'd like. if (isset($this->view->field[$field])) { - $group_content = $this->get_field($index, $field); + $group_content = $this->getField($index, $field); if ($this->view->field[$field]->options['label']) { $group_content = $this->view->field[$field]->options['label'] . ': ' . $group_content; } @@ -557,7 +557,7 @@ function render_grouping($records, $groupings = array(), $group_rendered = NULL) } } else { - $grouping = $this->get_field_value($index, $field); + $grouping = $this->getField_value($index, $field); // Not all field handlers return a scalar value, // e.g. views_handler_field_field. if (!is_scalar($grouping)) { @@ -644,7 +644,7 @@ protected function render_fields(array $result) { * @return string|null * The output of the field, or NULL if it was empty. */ - public function get_field($index, $field) { + public function getField($index, $field) { if (!isset($this->rendered_fields)) { $this->render_fields($this->view->result); } @@ -662,7 +662,7 @@ public function get_field($index, $field) { * @param $field * The id of the field. */ - function get_field_value($index, $field) { + function getField_value($index, $field) { $this->view->row_index = $index; $value = $this->view->field[$field]->get_value($this->view->result[$index]); unset($this->view->row_index); diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldCounterTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldCounterTest.php index 721b3c5..cddff8b 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldCounterTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldCounterTest.php @@ -60,11 +60,11 @@ function testSimple() { )); $view->preview(); - $counter = $view->style_plugin->get_field(0, 'counter'); + $counter = $view->style_plugin->getField(0, 'counter'); $this->assertEqual($counter, 1, format_string('Make sure the expected number (@expected) patches with the rendered number (@counter)', array('@expected' => 1, '@counter' => $counter))); - $counter = $view->style_plugin->get_field(1, 'counter'); + $counter = $view->style_plugin->getField(1, 'counter'); $this->assertEqual($counter, 2, format_string('Make sure the expected number (@expected) patches with the rendered number (@counter)', array('@expected' => 2, '@counter' => $counter))); - $counter = $view->style_plugin->get_field(2, 'counter'); + $counter = $view->style_plugin->getField(2, 'counter'); $this->assertEqual($counter, 3, format_string('Make sure the expected number (@expected) patches with the rendered number (@counter)', array('@expected' => 3, '@counter' => $counter))); $view->destroy(); @@ -87,13 +87,13 @@ function testSimple() { )); $view->preview(); - $counter = $view->style_plugin->get_field(0, 'counter'); + $counter = $view->style_plugin->getField(0, 'counter'); $expected_number = 0 + $rand_start; $this->assertEqual($counter, $expected_number, format_string('Make sure the expected number (@expected) patches with the rendered number (@counter)', array('@expected' => $expected_number, '@counter' => $counter))); - $counter = $view->style_plugin->get_field(1, 'counter'); + $counter = $view->style_plugin->getField(1, 'counter'); $expected_number = 1 + $rand_start; $this->assertEqual($counter, $expected_number, format_string('Make sure the expected number (@expected) patches with the rendered number (@counter)', array('@expected' => $expected_number, '@counter' => $counter))); - $counter = $view->style_plugin->get_field(2, 'counter'); + $counter = $view->style_plugin->getField(2, 'counter'); $expected_number = 2 + $rand_start; $this->assertEqual($counter, $expected_number, format_string('Make sure the expected number (@expected) patches with the rendered number (@counter)', array('@expected' => $expected_number, '@counter' => $counter))); } diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldCustomTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldCustomTest.php index 237efc7..8f70f48 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldCustomTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldCustomTest.php @@ -55,7 +55,7 @@ public function testFieldCustom() { $this->executeView($view); - $this->assertEqual($random, $view->style_plugin->get_field(0, 'name')); + $this->assertEqual($random, $view->style_plugin->getField(0, 'name')); } } diff --git a/core/modules/views/tests/views_test_data/views_test_data.module b/core/modules/views/tests/views_test_data/views_test_data.module index 9dc5159..407d64c 100644 --- a/core/modules/views/tests/views_test_data/views_test_data.module +++ b/core/modules/views/tests/views_test_data/views_test_data.module @@ -87,7 +87,7 @@ function template_preprocess_views_view_mapping_test(&$variables) { $field_names = array($field_names); } foreach ($field_names as $field_name) { - if ($value = $variables['view']->style_plugin->get_field($delta, $field_name)) { + if ($value = $variables['view']->style_plugin->getField($delta, $field_name)) { $fields[$type . '-' . $field_name] = $type . ':' . $value; } } diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index e987ffd..b3d427f 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -185,7 +185,7 @@ function template_preprocess_views_view_fields(&$vars) { $vars['fields'] = array(); // ensure it's at least an empty array. foreach ($view->field as $id => $field) { // render this even if set to exclude so it can be used elsewhere. - $field_output = $view->style_plugin->get_field($view->row_index, $id); + $field_output = $view->style_plugin->getField($view->row_index, $id); $empty = $field->is_value_empty($field_output, $field->options['empty_zero']); if (empty($field->options['exclude']) && (!$empty || (empty($field->options['hide_empty']) && empty($vars['options']['hide_empty'])))) { $object = new stdClass(); @@ -555,7 +555,7 @@ function template_preprocess_views_view_table(&$vars) { } if (!empty($fields[$field]) && empty($fields[$field]->options['exclude'])) { - $field_output = $handler->get_field($num, $field); + $field_output = $handler->getField($num, $field); $element_type = $fields[$field]->element_type(TRUE, TRUE); if ($element_type) { $field_output = '<' . $element_type . '>' . $field_output . '';