StringData.php in Drupal 10
Same filename and directory in other branches
Namespace
Drupal\Core\TypedData\Plugin\DataTypeFile
core/lib/Drupal/Core/TypedData/Plugin/DataType/StringData.phpView source
<?php
namespace Drupal\Core\TypedData\Plugin\DataType;
use Drupal\Core\TypedData\PrimitiveBase;
use Drupal\Core\TypedData\Type\StringInterface;
/**
* 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.
*
* @DataType(
* id = "string",
* label = @Translation("String")
* )
*/
class StringData extends PrimitiveBase implements StringInterface {
/**
* {@inheritdoc}
*/
public function getCastedValue() {
return $this
->getString();
}
}
Classes
Name![]() |
Description |
---|---|
StringData | The string data type. |