You are here

public function NifProcessed::getValue in Field NIF 8

Gets the data value.

Return value

mixed The data value.

Overrides TypedData::getValue

File

src/NifProcessed.php, line 38

Class

NifProcessed
A computed property for processing NIF/CIF/NIE documents.

Namespace

Drupal\field_nif

Code

public function getValue() {
  if ($this->processed !== NULL) {
    return $this->processed;
  }
  $this->processed = '';
  $item = $this
    ->getParent();
  $source = $this->definition
    ->getSetting('document source');
  foreach ($source as $property) {
    $this->processed .= $item->{$property};
  }
  return $this->processed;
}