function StringData::getCastedValue
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/StringData.php \Drupal\Core\TypedData\Plugin\DataType\StringData::getCastedValue()
- 8.9.x core/lib/Drupal/Core/TypedData/Plugin/DataType/StringData.php \Drupal\Core\TypedData\Plugin\DataType\StringData::getCastedValue()
- 10 core/lib/Drupal/Core/TypedData/Plugin/DataType/StringData.php \Drupal\Core\TypedData\Plugin\DataType\StringData::getCastedValue()
Attributes
Return value
mixed The primitive data value cast to the correct PHP type.
Overrides PrimitiveInterface::getCastedValue
3 calls to StringData::getCastedValue()
- DurationIso8601::getCastedValue in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ DurationIso8601.php - #[JsonSchema([ 'type' => 'string', 'format' => 'duration', ])]
- Email::getCastedValue in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ Email.php - #[JsonSchema([ 'type' => 'string', 'format' => 'email', ])]
- Uri::getCastedValue in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ Uri.php - #[JsonSchema([ 'type' => 'string', 'format' => 'uri', ])]
4 methods override StringData::getCastedValue()
- DecimalData::getCastedValue in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ DecimalData.php - #[JsonSchema([ 'type' => 'string', 'format' => 'number', ])]
- DurationIso8601::getCastedValue in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ DurationIso8601.php - #[JsonSchema([ 'type' => 'string', 'format' => 'duration', ])]
- Email::getCastedValue in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ Email.php - #[JsonSchema([ 'type' => 'string', 'format' => 'email', ])]
- Uri::getCastedValue in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ Uri.php - #[JsonSchema([ 'type' => 'string', 'format' => 'uri', ])]
File
-
core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ StringData.php, line 26
Class
- StringData
- The string data type.
Namespace
Drupal\Core\TypedData\Plugin\DataTypeCode
public function getCastedValue() {
return $this->getString();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.