public function UltimenuToolInterface::truncateRegionKey in Ultimenu 8.2
Simplify menu names or menu item titles for region key.
If region key is to use menu item title: Region key: ultimenu_LOOOOOOOOOOOONGMENUNAME_LOOOOOOOOOOOOOOOOOONGMENUITEM. If region key is to use unfriendly key UUID, we'll only care for menu name. Region key: ultimenu_LOOOOOOOOOOOOOONGMENUNAME_1c2d3e4.
Parameters
string $string: The Menu name or menu item title.
int $max_length: The amount of characters to truncate.
Return value
string The truncated menu properties ready to use for region key.
1 method overrides UltimenuToolInterface::truncateRegionKey()
- UltimenuTool::truncateRegionKey in src/
UltimenuTool.php - Simplify menu names or menu item titles for region key.
File
- src/
UltimenuToolInterface.php, line 53
Class
- UltimenuToolInterface
- Interface for Ultimenu tools.
Namespace
Drupal\ultimenuCode
public function truncateRegionKey($string, $max_length = self::MAX_LENGTH);