StringInterface::getPlurals

public StringInterface::getPlurals() Splits string to work with plural values. Return value array Array of strings that are plural variants. File core/modules/locale/src/StringInterface.php, line 70 Class StringInterface Defines the locale string interface. Namespace Drupal\locale Code public function getPlurals();

StringInterface::getString

public StringInterface::getString() Gets plain string contained in this object. Return value string The string contained in this object. File core/modules/locale/src/StringInterface.php, line 52 Class StringInterface Defines the locale string interface. Namespace Drupal\locale Code public function getString();

StringInterface::getValues

public StringInterface::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. File core/modules/locale/src/StringInterface.php, line 147 Class StringInterface Defines the locale string interface. Namespace Drupal\locale Code public function getValues(array $fields);

StringInterface::getId

public StringInterface::getId() Gets the string unique identifier. Return value int The string identifier. File core/modules/locale/src/StringInterface.php, line 16 Class StringInterface Defines the locale string interface. Namespace Drupal\locale Code public function getId();

StringInterface::delete

public StringInterface::delete() Deletes string object from storage. Return value $this Throws \Drupal\locale\StringStorageException In case of failures, an exception is thrown. File core/modules/locale/src/StringInterface.php, line 214 Class StringInterface Defines the locale string interface. Namespace Drupal\locale Code public function delete();

StringInterface::addLocation

public StringInterface::addLocation($type, $name) Adds a location for this string. Parameters string $type: Location type that may be any arbitrary string. Types used in Drupal core are: 'javascript', 'path', 'code', 'configuration'. string $name: Location name. Drupal path in case of online discovered translations, file path in case of imported strings, configuration name for strings that come from configuration, etc. Return value $this File core/modules/locale/src/StringInterface.php, line

StringInterface

Defines the locale string interface. Hierarchy interface \Drupal\locale\StringInterface File core/modules/locale/src/StringInterface.php, line 8 Namespace Drupal\locale Members Name Modifiers Type Description StringInterface::addLocation public function Adds a location for this string. StringInterface::delete public function Deletes string object from storage. StringInterface::getId public function Gets the string unique identifier. StringInterface::get

StringInterface::getLocations

public StringInterface::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 locat

StringDatabaseStorage::updateLocation

protected StringDatabaseStorage::updateLocation($string) Update locations for string. Parameters \Drupal\locale\StringInterface $string: The string object. File core/modules/locale/src/StringDatabaseStorage.php, line 137 Class StringDatabaseStorage Defines a class to store localized strings in the database. Namespace Drupal\locale Code protected function updateLocation($string) { if ($locations = $string->getLocations(TRUE)) { $created = FALSE; foreach ($locations as $typ

StringDatabaseStorage::__construct

public StringDatabaseStorage::__construct(Connection $connection, array $options = array()) Constructs a new StringDatabaseStorage class. Parameters \Drupal\Core\Database\Connection $connection: A Database connection to use for reading and writing configuration data. array $options: (optional) Any additional database connection options to use in queries. File core/modules/locale/src/StringDatabaseStorage.php, line 34 Class StringDatabaseStorage Defines a class to store localized strings i