protected function UltimenuManager::getShortenedUuid in Ultimenu 8
Gets the shortened UUID.
Parameters
string $key: The menu item key with UUID.
Return value
string The shortened UUID.
2 calls to UltimenuManager::getShortenedUuid()
- UltimenuManager::buildMenuTree in src/
UltimenuManager.php - Build the menu to contain Ultimenu regions.
- UltimenuManager::getRegionKey in src/
UltimenuManager.php - Gets the region key.
File
- src/
UltimenuManager.php, line 281
Class
- UltimenuManager
- Manages Ultimenu plugin.
Namespace
Drupal\ultimenuCode
protected function getShortenedUuid($key) {
list(, $uuid) = array_pad(array_map('trim', explode(":", $key, 2)), 2, NULL);
$uuid = str_replace('.', '__', $uuid ?: $key);
list($shortened_uuid, ) = array_pad(array_map('trim', explode("-", $uuid, 2)), 2, NULL);
return $shortened_uuid;
}