You are here

protected function JsonFeedFields::getTags in JSON Feed 8

Retrieve and format tag attribute values.

Parameters

int $row_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

array An array of tag strings.

1 call to JsonFeedFields::getTags()
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 283

Class

JsonFeedFields
Plugin which displays fields for a JSON feed.

Namespace

Drupal\json_feed\Plugin\views\row

Code

protected function getTags($row_index, $field_id) {
  $tags_csv = $this
    ->getField($row_index, $field_id);
  return array_map('trim', explode(',', $tags_csv));
}