You are here

private function GenerateTagCommand::nameToPluginId in Metatag 8

Convert the meta tag's name to a plugin ID.

Parameters

string $name: The meta tag name to convert.

Return value

string The original string with all non-alphanumeric characters converted to underline chars.

1 call to GenerateTagCommand::nameToPluginId()
GenerateTagCommand::interact in src/Command/GenerateTagCommand.php

File

src/Command/GenerateTagCommand.php, line 319

Class

GenerateTagCommand
Class GenerateTagCommand.

Namespace

Drupal\metatag\Command

Code

private function nameToPluginId($name) {
  return $this->stringConverter
    ->createMachineName($name);
}