public function ToolbarMenuManager::cleanId in Toolbar Menu 8
Same name and namespace in other branches
- 8.2 src/ToolbarMenuManager.php \Drupal\toolbar_menu\ToolbarMenuManager::cleanId()
Helper to clean an ID.
Parameters
string $id: The ID to clean.
Return value
string The cleaned ID.
File
- src/
ToolbarMenuManager.php, line 77
Class
- ToolbarMenuManager
- Implement a setting form for toolbar_menu module.
Namespace
Drupal\toolbar_menuCode
public function cleanId($id) {
return preg_replace('/[^\\p{L}\\p{N}]/u', '-', $id);
}