You are here

public function DimensionsItem::getWidth in Physical Fields 8

Gets the width as a value object.

Return value

\Drupal\physical\Length The width.

File

src/Plugin/Field/FieldType/DimensionsItem.php, line 142

Class

DimensionsItem
Plugin implementation of the 'physical_dimensions' field type.

Namespace

Drupal\physical\Plugin\Field\FieldType

Code

public function getWidth() {
  return new Length($this->width, $this->unit);
}