function BlockRepositoryInterface::getUniqueMachineName

Same name in other branches
  1. 11.x core/modules/block/src/BlockRepositoryInterface.php \Drupal\block\BlockRepositoryInterface::getUniqueMachineName()

Based on a suggested string generates a unique machine name for a block.

Parameters

string $suggestion: The suggested block ID.

string $theme: The machine name of the theme.

Return value

string Returns the unique name.

File

core/modules/block/src/BlockRepositoryInterface.php, line 45

Class

BlockRepositoryInterface

Namespace

Drupal\block

Code

public function getUniqueMachineName(string $suggestion, string $theme) : string;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.