You are here

function feeds_tamper_make_machine in Feeds Tamper 8.2

Same name and namespace in other branches
  1. 6 feeds_tamper.inc \feeds_tamper_make_machine()
  2. 7 feeds_tamper.inc \feeds_tamper_make_machine()

Return a machine name safe version of a string.

Parameters

string $string: String to get machine nameized.

Return value

string A lowercase string with all values not in [a-zA-Z0-9] replaced with an underscore and shortened to 128 characters.

2 calls to feeds_tamper_make_machine()
FeedsTamperUIWebTestCase::addTamperPlugin in legacy/feeds_tamper_ui/tests/feeds_tamper_ui.test
feeds_tamper_machine_name_callback in legacy/feeds_tamper_ui/feeds_tamper_ui.admin.inc
Helper functions for ajax.

File

legacy/feeds_tamper.inc, line 18
Version agnostic parts of feeds_tamper.module.

Code

function feeds_tamper_make_machine($string) {
  return drupal_substr(preg_replace('/[^a-z0-9-]/u', '_', drupal_strtolower($string)), 0, 127);
}