You are here

public function UltimenuTool::getShortenedHash in Ultimenu 8.2

Gets the shortened hash of a menu item key.

Parameters

string $key: The menu item key.

Return value

string The shortened hash.

Overrides UltimenuToolInterface::getShortenedHash

1 call to UltimenuTool::getShortenedHash()
UltimenuTool::getRegionKey in src/UltimenuTool.php
Gets the region key.

File

src/UltimenuTool.php, line 111

Class

UltimenuTool
Provides Ultimenu utility methods.

Namespace

Drupal\ultimenu

Code

public function getShortenedHash($key) {
  return substr(sha1($key), 0, 8);
}