StaticMenuLinkOverrides::encodeId

protected static StaticMenuLinkOverrides::encodeId($id)

Encodes the ID by replacing dots with double underscores.

This is done because config schema uses dots for its internal type hierarchy. Double underscores are converted to triple underscores to avoid accidental conflicts.

Parameters

string $id: The menu plugin ID.

Return value

string The menu plugin ID with double underscore instead of dots.

File

core/lib/Drupal/Core/Menu/StaticMenuLinkOverrides.php, line 175

Class

StaticMenuLinkOverrides
Defines an implementation of the menu link override using a config file.

Namespace

Drupal\Core\Menu

Code

protected static function encodeId($id) {
  return strtr($id, array('.' => '__', '__' => '___'));
}
doc_Drupal
2016-10-29 09:44:22
Comments
Leave a Comment

Please login to continue.