You are here

public function ReportReplacer::defineField in Forena Reports 8

Define the fields associated with the formatter.

Parameters

string $key: Field replacement id

$field: Field definition.

File

src/Token/ReportReplacer.php, line 101

Class

ReportReplacer

Namespace

Drupal\forena\Token

Code

public function defineField($key, $field) {
  $def = [];

  //Make sure attribute names don't have -
  foreach ($field as $attr => $value) {
    $def[$attr] = $value;
  }
  $this->fields[$key] = $def;
}