You are here

protected function CumulativeField::getRewriteStatus in Views Cumulative Field 8

Determine if the field is rewritten/altered.

Parameters

$field:

Return value

mixed

1 call to CumulativeField::getRewriteStatus()
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 123
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 getRewriteStatus($field) {
  $field_handler = $this->displayHandler
    ->getHandler('field', $field)->options;
  if ($field_handler['alter']['alter_text'] && !empty($field_handler['alter']['text'])) {
    $alter = $field_handler['alter']['text'];
  }
  else {
    $alter = NULL;
  }
  return $alter;
}