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