You are here

public function PriceModified::toArray in Price 3.x

Same name and namespace in other branches
  1. 8 src/PriceModified.php \Drupal\price\PriceModified::toArray()
  2. 3.0.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\price

Code

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