StringBase::setId

public StringBase::setId($lid) Sets the string unique identifier. Parameters int $id: The string identifier. Return value $this Overrides StringInterface::setId File core/modules/locale/src/StringBase.php, line 74 Class StringBase Defines the locale string base class. Namespace Drupal\locale Code public function setId($lid) { $this->lid = $lid; return $this; }

StringBase::save

public StringBase::save() Saves string object to storage. Return value $this Throws \Drupal\locale\StringStorageException In case of failures, an exception is thrown. Overrides StringInterface::save File core/modules/locale/src/StringBase.php, line 181 Class StringBase Defines the locale string base class. Namespace Drupal\locale Code public function save() { if ($storage = $this->getStorage()) { $storage->save($this); } else { throw new StringStorageException('Th

StringBase::hasLocation

public StringBase::hasLocation($type, $name) Checks whether the string has a given location. Parameters string $type: Location type. string $name: Location name. Return value bool TRUE if the string has a location with this type and name. Overrides StringInterface::hasLocation File core/modules/locale/src/StringBase.php, line 173 Class StringBase Defines the locale string base class. Namespace Drupal\locale Code public function hasLocation($type, $name) { $locations = $this->get

StringBase::getVersion

public StringBase::getVersion() Gets the string version. Return value string Version identifier. Overrides StringInterface::getVersion File core/modules/locale/src/StringBase.php, line 82 Class StringBase Defines the locale string base class. Namespace Drupal\locale Code public function getVersion() { return isset($this->version) ? $this->version : NULL; }

StringBase::getValues

public StringBase::getValues(array $fields) Gets field values that are set for given field names. Parameters array $fields: Array of field names. Return value array Array of field values indexed by field name. Overrides StringInterface::getValues File core/modules/locale/src/StringBase.php, line 139 Class StringBase Defines the locale string base class. Namespace Drupal\locale Code public function getValues(array $fields) { $values = array(); foreach ($fields as $field) { if

StringBase::getStorage

public StringBase::getStorage() Gets the string storage. Return value \Drupal\locale\StringStorageInterface The storage used for this string. Overrides StringInterface::getStorage File core/modules/locale/src/StringBase.php, line 112 Class StringBase Defines the locale string base class. Namespace Drupal\locale Code public function getStorage() { return isset($this->storage) ? $this->storage : NULL; }

StringBase::getPlurals

public StringBase::getPlurals() Splits string to work with plural values. Return value array Array of strings that are plural variants. Overrides StringInterface::getPlurals File core/modules/locale/src/StringBase.php, line 97 Class StringBase Defines the locale string base class. Namespace Drupal\locale Code public function getPlurals() { return explode(LOCALE_PLURAL_DELIMITER, $this->getString()); }

StringBase::getLocations

public StringBase::getLocations($check_only = FALSE) Gets location information for this string. Locations are arbitrary pairs of type and name strings, used to store information about the origins of the string, like the file name it was found on, the path on which it was discovered, etc. A string can have any number of locations since the same string may be found on different places of Drupal code and configuration. Parameters bool $check_only: (optional) Set to TRUE to get only new locations

StringBase::getId

public StringBase::getId() Gets the string unique identifier. Return value int The string identifier. Overrides StringInterface::getId File core/modules/locale/src/StringBase.php, line 67 Class StringBase Defines the locale string base class. Namespace Drupal\locale Code public function getId() { return isset($this->lid) ? $this->lid : NULL; }

StringBase::delete

public StringBase::delete() Deletes string object from storage. Return value $this Throws \Drupal\locale\StringStorageException In case of failures, an exception is thrown. Overrides StringInterface::delete File core/modules/locale/src/StringBase.php, line 194 Class StringBase Defines the locale string base class. Namespace Drupal\locale Code public function delete() { if (!$this->isNew()) { if ($storage = $this->getStorage()) { $storage->delete($this); }