You are here

protected function CumulativeField::getFieldRelationship in Views Cumulative Field 8

Determine if the field comes from a relationship.

Parameters

$field:

Return value

mixed

1 call to CumulativeField::getFieldRelationship()
CumulativeField::getValue in src/Plugin/views/field/CumulativeField.php
Gets the value that's supposed to be rendered.

File

src/Plugin/views/field/CumulativeField.php, line 104
Defines Drupal\views_cumulative_field\Plugin\views\field\CumulativeField.

Class

CumulativeField
Field handler to flag the node type.

Namespace

Drupal\views_cumulative_field\Plugin\views\field

Code

protected function getFieldRelationship($field) {
  $field_handler = $this->displayHandler
    ->getHandler('field', $field)->options;
  if (!empty($field_handler['relationship']) && $field_handler['relationship'] !== 'none') {
    $relationship = $field_handler['relationship'];
  }
  else {
    $relationship = NULL;
  }
  return $relationship;
}