public function PriceModifiedItem::toPrice in Price 8
Same name and namespace in other branches
- 3.x src/Plugin/Field/FieldType/PriceModifiedItem.php \Drupal\price\Plugin\Field\FieldType\PriceModifiedItem::toPrice()
- 3.0.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);
}