You are here

function _potx_form_id in Translation template extractor 5.2

Same name and namespace in other branches
  1. 5 potx.module \_potx_form_id()
  2. 6.3 potx.admin.inc \_potx_form_id()
  3. 6 potx.module \_potx_form_id()
  4. 6.2 potx.module \_potx_form_id()
  5. 7.3 potx.admin.inc \_potx_form_id()
  6. 7 potx.module \_potx_form_id()
  7. 7.2 potx.admin.inc \_potx_form_id()

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

Parameters

$type: Type of ID generated: 'fs' for fieldset, 'dir' for directory, 'mod' for module

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

Return value

The generated ID.

File

./potx.module, line 259
Gettext translation template and translation extractor.

Code

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