public static function UnitInterface::assertExists in Physical Fields 8
Asserts that the given unit exists.
Parameters
string $unit: The unit.
Throws
\InvalidArgumentException
5 methods override UnitInterface::assertExists()
- AreaUnit::assertExists in src/
AreaUnit.php - Asserts that the given unit exists.
- LengthUnit::assertExists in src/
LengthUnit.php - Asserts that the given unit exists.
- TemperatureUnit::assertExists in src/
TemperatureUnit.php - Asserts that the given unit exists.
- VolumeUnit::assertExists in src/
VolumeUnit.php - Asserts that the given unit exists.
- WeightUnit::assertExists in src/
WeightUnit.php - Asserts that the given unit exists.
File
- src/
UnitInterface.php, line 51
Class
- UnitInterface
- Provides the interface for unit classes.
Namespace
Drupal\physicalCode
public static function assertExists($unit);