Mercurial > hg > isophonics-drupal-site
view core/modules/locale/src/SourceString.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 129ea1e6d783 |
line wrap: on
line source
<?php namespace Drupal\locale; /** * Defines the locale source string object. * * This class represents a module-defined string value that is to be translated. * This string must at least contain a 'source' field, which is the raw source * value, and is assumed to be in English language. */ class SourceString extends StringBase { /** * {@inheritdoc} */ public function isSource() { return isset($this->source); } /** * {@inheritdoc} */ public function isTranslation() { return FALSE; } /** * {@inheritdoc} */ public function getString() { return isset($this->source) ? $this->source : ''; } /** * {@inheritdoc} */ public function setString($string) { $this->source = $string; return $this; } /** * {@inheritdoc} */ public function isNew() { return empty($this->lid); } }