private static function Terms::normalizeVocTermName in Hook Update Deploy Tools 7
Normalizes unique string that identifies the vocabulary and term names.
Parameters
string $vocabulary_name: The name of the vocabulary.
string $term_name: The name of the term.
Return value
string A string resembling a machine name with underscores.
1 call to Terms::normalizeVocTermName()
- Terms::export in src/
Terms.php - Exports a single term based on its tid. (Typically called from Drush).
File
- src/
Terms.php, line 260
Class
- Terms
- Public methods for dealing with Vocabularies.
Namespace
HookUpdateDeployToolsCode
private static function normalizeVocTermName($vocabulary_name, $term_name) {
$items = array(
// Remove spaces.
' ' => 'sSs',
);
$vocabulary_name = str_replace(array_keys($items), array_values($items), $vocabulary_name);
$term_name = str_replace(array_keys($items), array_values($items), $term_name);
return "{$vocabulary_name}zZz{$term_name}";
}