public function Price::__toString in Price 8
Same name and namespace in other branches
- 3.x src/Price.php \Drupal\price\Price::__toString()
- 2.0.x src/Price.php \Drupal\price\Price::__toString()
- 2.x src/Price.php \Drupal\price\Price::__toString()
- 3.0.x src/Price.php \Drupal\price\Price::__toString()
Gets the string representation of the price.
Return value
string The string representation of the price.
File
- src/
Price.php, line 70
Class
- Price
- Provides a value object for monetary values.
Namespace
Drupal\priceCode
public function __toString() {
return Calculator::trim($this->number) . ' ' . $this->currencyCode;
}