3 namespace Drupal\Core\TypedData\Plugin\DataType;
5 use Drupal\Core\TypedData\PrimitiveBase;
6 use Drupal\Core\TypedData\Type\IntegerInterface;
9 * The integer data type.
11 * The plain value of an integer is a regular PHP integer. For setting the value
12 * any PHP variable that casts to an integer may be passed.
16 * label = @Translation("Integer")
19 class IntegerData extends PrimitiveBase implements IntegerInterface {
24 public function getCastedValue() {
25 return (int) $this->value;