3 namespace Drupal\locale;
6 * Defines the locale source string object.
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.
12 class SourceString extends StringBase {
17 public function isSource() {
18 return isset($this->source);
24 public function isTranslation() {
31 public function getString() {
32 return isset($this->source) ? $this->source : '';
38 public function setString($string) {
39 $this->source = $string;
46 public function isNew() {
47 return empty($this->lid);