You are here

public function Measurement::__toString in Physical Fields 8

Gets the string representation of the measurement.

Return value

string The string representation of the measurement.

File

src/Measurement.php, line 77

Class

Measurement
Provides a base class for measurement value objects.

Namespace

Drupal\physical

Code

public function __toString() {
  return Calculator::trim($this->number) . ' ' . $this->unit;
}