You are here

public function UltimenuManagerInterface::truncateRegionKey in Ultimenu 8

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 UltimenuManagerInterface::truncateRegionKey()
UltimenuManager::truncateRegionKey in src/UltimenuManager.php
Simplify menu names or menu item titles for region key.

File

src/UltimenuManagerInterface.php, line 119

Class

UltimenuManagerInterface
Interface for Ultimenu plugins.

Namespace

Drupal\ultimenu

Code

public function truncateRegionKey($string, $max_length = 28);