class IntegerData in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/TypedData/Plugin/DataType/IntegerData.php \Drupal\Core\TypedData\Plugin\DataType\IntegerData
- 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/IntegerData.php \Drupal\Core\TypedData\Plugin\DataType\IntegerData
The integer data type.
The plain value of an integer is a regular PHP integer. For setting the value any PHP variable that casts to an integer may be passed.
Plugin annotation
@DataType(
id = "integer",
label = @Translation("Integer")
)
Hierarchy
- class \Drupal\Core\TypedData\Plugin\DataType\IntegerData extends \Drupal\Core\TypedData\PrimitiveBase implements \Drupal\Core\TypedData\Type\IntegerInterface
Expanded class hierarchy of IntegerData
5 files declare their use of IntegerData
- ConfigEntityAdapterTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ ConfigEntityAdapterTest.php - DateTimeIso8601NormalizerTest.php in core/
modules/ serialization/ tests/ src/ Unit/ Normalizer/ DateTimeIso8601NormalizerTest.php - DateTimeNormalizerTest.php in core/
modules/ serialization/ tests/ src/ Unit/ Normalizer/ DateTimeNormalizerTest.php - PrimitiveDataNormalizerTest.php in core/
modules/ serialization/ tests/ src/ Unit/ Normalizer/ PrimitiveDataNormalizerTest.php - TimestampNormalizerTest.php in core/
modules/ serialization/ tests/ src/ Unit/ Normalizer/ TimestampNormalizerTest.php
1 string reference to 'IntegerData'
- core.data_types.schema.yml in core/
config/ schema/ core.data_types.schema.yml - core/config/schema/core.data_types.schema.yml
File
- core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ IntegerData.php, line 19
Namespace
Drupal\Core\TypedData\Plugin\DataTypeView source
class IntegerData extends PrimitiveBase implements IntegerInterface {
/**
* {@inheritdoc}
*/
public function getCastedValue() {
return (int) $this->value;
}
}