function RssFields::getField
Same name in other branches
- 9 core/modules/views/src/Plugin/views/row/RssFields.php \Drupal\views\Plugin\views\row\RssFields::getField()
- 10 core/modules/views/src/Plugin/views/row/RssFields.php \Drupal\views\Plugin\views\row\RssFields::getField()
- 11.x core/modules/views/src/Plugin/views/row/RssFields.php \Drupal\views\Plugin\views\row\RssFields::getField()
Retrieves a views field value from the style plugin.
Parameters
$index: The index count of the row as expected by views_plugin_style::getField().
$field_id: The ID assigned to the required field in the display.
Return value
string|null|\Drupal\Component\Render\MarkupInterface An empty string if there is no style plugin, or the field ID is empty. NULL if the field value is empty. If neither of these conditions apply, a MarkupInterface object containing the rendered field value.
1 call to RssFields::getField()
- RssFields::render in core/
modules/ views/ src/ Plugin/ views/ row/ RssFields.php - Render a row object. This usually passes through to a theme template of some form, but not always.
File
-
core/
modules/ views/ src/ Plugin/ views/ row/ RssFields.php, line 199
Class
- RssFields
- Renders an RSS item based on fields.
Namespace
Drupal\views\Plugin\views\rowCode
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.