You are here

public function RssFields::getField in Views RSS 8.2

Same name and namespace in other branches
  1. 8.3 src/Plugin/views/row/RssFields.php \Drupal\views_rss\Plugin\views\row\RssFields::getField()

Retrieves a views field value from the style plugin.

Parameters

int $index: The index count of the row as expected by views_plugin_style::getField().

string $field_id: The ID assigned to the required field in the display.

1 call to RssFields::getField()
RssFields::mapRow in src/Plugin/views/row/RssFields.php
Protected fuction mapRow.

File

src/Plugin/views/row/RssFields.php, line 344

Class

RssFields
Renders an RSS item based on fields.

Namespace

Drupal\views_rss\Plugin\views\row

Code

public 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
    ->getField($index, $field_id);
}