public function PriceModifiedItem::toPrice in Price 3.0.x
Same name and namespace in other branches
- 8 src/Plugin/Field/FieldType/PriceModifiedItem.php \Drupal\price\Plugin\Field\FieldType\PriceModifiedItem::toPrice()
- 3.x src/Plugin/Field/FieldType/PriceModifiedItem.php \Drupal\price\Plugin\Field\FieldType\PriceModifiedItem::toPrice()
Gets the Price value object for the current field item.
Return value
\Drupal\price\PriceModified The Price value object.
Overrides PriceItem::toPrice
File
- src/
Plugin/ Field/ FieldType/ PriceModifiedItem.php, line 131
Class
- PriceModifiedItem
- Plugin implementation of the 'modified price' field type.
Namespace
Drupal\price\Plugin\Field\FieldTypeCode
public function toPrice() {
return new PriceModified($this->number, $this->currency_code, $this->modifier);
}