You are here

function _potx_form_id in Translation template extractor 6.3

Same name and namespace in other branches
  1. 5.2 potx.module \_potx_form_id()
  2. 5 potx.module \_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, 'com' for component.

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

Return value

string The generated ID.

File

./potx.admin.inc, line 236
Administrative interface for the module.

Code

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