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 {
16 public function isSource() {
17 return isset($this->source);
23 public function isTranslation() {
30 public function getString() {
31 return isset($this->source) ? $this->source : '';
37 public function setString($string) {
38 $this->source = $string;
45 public function isNew() {
46 return empty($this->lid);