class BooleanData
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/BooleanData.php \Drupal\Core\TypedData\Plugin\DataType\BooleanData
- 8.9.x core/lib/Drupal/Core/TypedData/Plugin/DataType/BooleanData.php \Drupal\Core\TypedData\Plugin\DataType\BooleanData
- 10 core/lib/Drupal/Core/TypedData/Plugin/DataType/BooleanData.php \Drupal\Core\TypedData\Plugin\DataType\BooleanData
The boolean data type.
The plain value of a boolean is a regular PHP boolean. For setting the value any PHP variable that casts to a boolean may be passed.
Hierarchy
- class \Drupal\Core\TypedData\TypedData implements \Drupal\Core\TypedData\TypedDataInterface, \Drupal\Component\Plugin\PluginInspectionInterface uses \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\TypedData\TypedDataTrait
- class \Drupal\Core\TypedData\PrimitiveBase extends \Drupal\Core\TypedData\TypedData implements \Drupal\Core\TypedData\PrimitiveInterface
- class \Drupal\Core\TypedData\Plugin\DataType\BooleanData extends \Drupal\Core\TypedData\PrimitiveBase implements \Drupal\Core\TypedData\Type\BooleanInterface
- class \Drupal\Core\TypedData\PrimitiveBase extends \Drupal\Core\TypedData\TypedData implements \Drupal\Core\TypedData\PrimitiveInterface
Expanded class hierarchy of BooleanData
4 files declare their use of BooleanData
- BooleanNormalizer.php in core/
modules/ serialization/ tests/ modules/ test_datatype_boolean_emoji_normalizer/ src/ Normalizer/ BooleanNormalizer.php - ConfigEntityAdapterTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ ConfigEntityAdapterTest.php - PrimitiveDataNormalizerTest.php in core/
modules/ serialization/ tests/ src/ Unit/ Normalizer/ PrimitiveDataNormalizerTest.php - PrimitiveTypeConstraintValidatorTest.php in core/
tests/ Drupal/ Tests/ Core/ Validation/ Plugin/ Validation/ Constraint/ PrimitiveTypeConstraintValidatorTest.php
1 string reference to 'BooleanData'
- 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/ BooleanData.php, line 17
Namespace
Drupal\Core\TypedData\Plugin\DataTypeView source
class BooleanData extends PrimitiveBase implements BooleanInterface {
/**
* {@inheritdoc}
*/
public function getCastedValue() {
return (bool) $this->value;
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.