Backup of db before drupal security update
[yaffs-website] / web / core / lib / Drupal / Core / TypedData / Plugin / DataType / StringData.php
1 <?php
2
3 namespace Drupal\Core\TypedData\Plugin\DataType;
4
5 use Drupal\Core\TypedData\PrimitiveBase;
6 use Drupal\Core\TypedData\Type\StringInterface;
7
8 /**
9  * The string data type.
10  *
11  * The plain value of a string is a regular PHP string. For setting the value
12  * any PHP variable that casts to a string may be passed.
13  *
14  * @DataType(
15  *   id = "string",
16  *   label = @Translation("String")
17  * )
18  */
19 class StringData extends PrimitiveBase implements StringInterface {
20
21   /**
22    * {@inheritdoc}
23    */
24   public function getCastedValue() {
25     return $this->getString();
26   }
27
28 }