Same name in other branches
  1. 8.x-1.x src/QuickSet.php \Drupal\quicktabs\QuickSet::translateString()

Translates Quicktabs user-defined strings if the i18n module is enabled.

1 call to QuickSet::translateString()
QuickSet::getTitle dans ./quicktabs.classes.inc

Fichier

./quicktabs.classes.inc, line 163

Classe

QuickSet
A QuickSet object is an unrendered Quicktabs instance, essentially just a container of content items, as defined by its configuration settings and the array of content items it contains.

Code

public function translateString($string, $type = 'tab', $index = 0) {
    switch ($type) {
        case 'tab':
            $name = "tab:{$this->name}:title:" . md5($string);
            break;
        case 'title':
            $name = "title:{$this->name}";
            break;
    }
    return quicktabs_translate($name, $string);
}