public static function HudtInternal::normalizeMachineName in Hook Update Deploy Tools 8
Same name and namespace in other branches
- 7 src/HudtInternal.php \HookUpdateDeployTools\HudtInternal::normalizeMachineName()
Normalizes a machine name to be underscores and removes file appendage.
Parameters
string $quasi_machinename: An machine name with hyphens or a export file name to be normalized.
Return value
string A string resembling a machine name with underscores.
5 calls to HudtInternal::normalizeMachineName()
- PageManager::export in src/
PageManager.php - Exports a single PageManager page (typically called from Drush).
- PageManager::import in src/
PageManager.php - Imports Page Manager pages using the panels module & template.
- Redirects::import in src/
Redirects.php - Imports a set of redirects from an import csv file.
- Rules::export in src/
Rules.php - Exports a single Rule when called (typically called from Drush).
- Rules::import in src/
Rules.php - Imports rules using the rule_import module & template.
File
- src/
HudtInternal.php, line 214
Class
- HudtInternal
- Methods for processes internal to Hook Deploy Update Tools.
Namespace
HookUpdateDeployToolsCode
public static function normalizeMachineName($quasi_machinename) {
$items = array(
'-export.txt' => '',
'-' => '_',
);
$machine_name = str_replace(array_keys($items), array_values($items), $quasi_machinename);
return $machine_name;
}