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