StringStorageInterface
interface StringStorageInterface (View source)
Defines the locale string storage interface.
Methods
Loads multiple source string objects.
Loads multiple string translation objects.
Loads string location information.
Loads a string source object, fast query.
Loads a string translation object, fast query.
Deletes source strings and translations using conditions.
Deletes translations using conditions.
Counts source strings.
Counts translations.
Creates a source string object bound to this storage but not saved.
Creates a string translation object bound to this storage but not saved.
Details
array
getStrings(array $conditions = [], array $options = [])
Loads multiple source string objects.
StringInterface[]
getTranslations(array $conditions = [], array $options = [])
Loads multiple string translation objects.
StringInterface[]
getLocations(array $conditions = [])
Loads string location information.
SourceString|null
findString(array $conditions)
Loads a string source object, fast query.
These 'fast query' methods are the ones in the critical path and their implementation must be optimized for speed, as they may run many times in a single page request.
TranslationString|null
findTranslation(array $conditions)
Loads a string translation object, fast query.
This function must only be used when actually translating strings as it will have the effect of updating the string version. For other purposes the getTranslations() method should be used instead.
$this
save(StringInterface $string)
Save string object to storage.
$this
delete(StringInterface $string)
Delete string from storage.
deleteStrings(array $conditions)
Deletes source strings and translations using conditions.
deleteTranslations(array $conditions)
Deletes translations using conditions.
int
countStrings()
Counts source strings.
array
countTranslations()
Counts translations.
SourceString
createString(array $values = [])
Creates a source string object bound to this storage but not saved.
TranslationString
createTranslation(array $values = [])
Creates a string translation object bound to this storage but not saved.