You are here

public function Measurement::toArray in Physical Fields 8

Gets the array representation of the measurement.

Return value

array The array representation of the measurement.

File

src/Measurement.php, line 87

Class

Measurement
Provides a base class for measurement value objects.

Namespace

Drupal\physical

Code

public function toArray() {
  return [
    'number' => $this->number,
    'unit' => $this->unit,
  ];
}