class StringData
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/StringData.php \Drupal\Core\TypedData\Plugin\DataType\StringData
- 8.9.x core/lib/Drupal/Core/TypedData/Plugin/DataType/StringData.php \Drupal\Core\TypedData\Plugin\DataType\StringData
- 10 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.
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\StringData extends \Drupal\Core\TypedData\PrimitiveBase implements \Drupal\Core\TypedData\Type\StringInterface
- class \Drupal\Core\TypedData\PrimitiveBase extends \Drupal\Core\TypedData\TypedData implements \Drupal\Core\TypedData\PrimitiveInterface
Expanded class hierarchy of StringData
9 files declare their use of StringData
- ComputedTestCacheableString.php in core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ DataType/ ComputedTestCacheableString.php - 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
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 16
Namespace
Drupal\Core\TypedData\Plugin\DataTypeView source
class StringData extends PrimitiveBase implements StringInterface {
/**
* {@inheritdoc}
*/
public function getCastedValue() {
return $this->getString();
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.