You are here

public function IntegerData::getCastedValue in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/IntegerData.php \Drupal\Core\TypedData\Plugin\DataType\IntegerData::getCastedValue()

Gets the primitive data value casted to the correct PHP type.

Return value

mixed

Overrides PrimitiveInterface::getCastedValue

File

core/lib/Drupal/Core/TypedData/Plugin/DataType/IntegerData.php, line 24

Class

IntegerData
The integer data type.

Namespace

Drupal\Core\TypedData\Plugin\DataType

Code

public function getCastedValue() {
  return (int) $this->value;
}