public function JsonFeedFields::getField in JSON Feed 8
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.
Return value
string The rendered field value.
4 calls to JsonFeedFields::getField()
- JsonFeedFields::getAbsoluteUrlForField in src/
Plugin/ views/ row/ JsonFeedFields.php - If the field value exists, return it as an absolute URL.
- JsonFeedFields::getAuthor in src/
Plugin/ views/ row/ JsonFeedFields.php - Retrieve and format author attribute values.
- JsonFeedFields::getTags in src/
Plugin/ views/ row/ JsonFeedFields.php - Retrieve and format tag attribute values.
- JsonFeedFields::render in src/
Plugin/ views/ row/ JsonFeedFields.php - Render a row object. This usually passes through to a theme template of some form, but not always.
File
- src/
Plugin/ views/ row/ JsonFeedFields.php, line 243
Class
- JsonFeedFields
- Plugin which displays fields for a JSON feed.
Namespace
Drupal\json_feed\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 (string) $this->view->style_plugin
->getField($index, $field_id);
}