public function i18n_string_textgroup_cached::string_update in Internationalization 7
Update / create / remove string.
@pram $string New value of string for update/create. May be empty for removing.
Parameters
$name: String context.
$format: Text format, that must have been checked against allowed formats for translation
$options: Processing options, the ones used here are:
- 'watchdog', whether to produce watchdog messages.
- 'messages', whether to produce user messages.
- 'check', whether to check string format and then update/delete if not allowed.
Return value
status SAVED_UPDATED | SAVED_NEW | SAVED_DELETED | FALSE (If the string is to be removed but has no source)
Overrides i18n_string_textgroup_default::string_update
File
- i18n_string/
i18n_string.inc, line 1513 - API for internationalization strings
Class
- i18n_string_textgroup_cached
- Textgroup handler for i18n_string API which integrated persistent caching.
Code
public function string_update($i18nstring, $options = array()) {
// Flush persistent cache.
cache_clear_all($i18nstring
->get_cid(), 'cache', TRUE);
return parent::string_update($i18nstring, $options);
}