Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / web / core / modules / locale / src / SourceString.php
1 <?php
2
3 namespace Drupal\locale;
4
5 /**
6  * Defines the locale source string object.
7  *
8  * This class represents a module-defined string value that is to be translated.
9  * This string must at least contain a 'source' field, which is the raw source
10  * value, and is assumed to be in English language.
11  */
12 class SourceString extends StringBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   public function isSource() {
18     return isset($this->source);
19   }
20
21   /**
22    * {@inheritdoc}
23    */
24   public function isTranslation() {
25     return FALSE;
26   }
27
28   /**
29    * {@inheritdoc}
30    */
31   public function getString() {
32     return isset($this->source) ? $this->source : '';
33   }
34
35   /**
36    * {@inheritdoc}
37    */
38   public function setString($string) {
39     $this->source = $string;
40     return $this;
41   }
42
43   /**
44    * {@inheritdoc}
45    */
46   public function isNew() {
47     return empty($this->lid);
48   }
49
50 }