You are here

public function DimensionsItem::getLength in Physical Fields 8

Gets the length as a value object.

Return value

\Drupal\physical\Length The length.

File

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

Class

DimensionsItem
Plugin implementation of the 'physical_dimensions' field type.

Namespace

Drupal\physical\Plugin\Field\FieldType

Code

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