You are here

private function PotxExtractTranslationForm::getFormElementId in Translation template extractor 8

Generate a sane form element ID for the current radio button.

Parameters

string $type: Type of ID generated: 'fs' for fieldset, 'dir' for directory, 'com' for component.

string $path: Path of file we generate an ID for.

Return value

string The generated ID.

File

src/Form/PotxExtractTranslationForm.php, line 343

Class

PotxExtractTranslationForm
Class PotxExtractTranslationForm.

Namespace

Drupal\potx\Form

Code

private function getFormElementId($type, $path) {
  return 'potx-' . $type . '-' . preg_replace('/[^a-zA-Z0-9]+/', '-', $path);
}