class StringData in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/TypedData/Plugin/DataType/StringData.php \Drupal\Core\TypedData\Plugin\DataType\StringData
- 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/StringData.php \Drupal\Core\TypedData\Plugin\DataType\StringData
The string data type.
The plain value of a string is a regular PHP string. For setting the value any PHP variable that casts to a string may be passed.
Plugin annotation
@DataType(
id = "string",
label = @Translation("String")
)
Hierarchy
- class \Drupal\Core\TypedData\Plugin\DataType\StringData extends \Drupal\Core\TypedData\PrimitiveBase implements \Drupal\Core\TypedData\Type\StringInterface
Expanded class hierarchy of StringData
6 files declare their use of StringData
- ConfigEntityAdapterTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ ConfigEntityAdapterTest.php - ConfigSchemaTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Config/ ConfigSchemaTest.php - ContextAwarePluginTraitTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Plugin/ Context/ ContextAwarePluginTraitTest.php - ContextTypedDataTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Plugin/ ContextTypedDataTest.php - FilterFormat.php in core/
modules/ filter/ src/ Plugin/ DataType/ FilterFormat.php
1 string reference to 'StringData'
- 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/ StringData.php, line 19
Namespace
Drupal\Core\TypedData\Plugin\DataTypeView source
class StringData extends PrimitiveBase implements StringInterface {
/**
* {@inheritdoc}
*/
public function getCastedValue() {
return $this
->getString();
}
}