You are here

function feeds_tamper_make_machine in Feeds Tamper 7

Same name and namespace in other branches
  1. 8.2 legacy/feeds_tamper.inc \feeds_tamper_make_machine()
  2. 6 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.

Related topics

3 calls to feeds_tamper_make_machine()
FeedsTamperUIWebTestCase::addTamperPlugin in feeds_tamper_ui/tests/feeds_tamper_ui.test
feeds_tamper_machine_name_callback in feeds_tamper_ui/feeds_tamper_ui.admin.inc
Helper functions for ajax.
feeds_tamper_ui_add_plugin_form_validate in feeds_tamper_ui/feeds_tamper_ui.admin.inc
Add plugin form validate handler.

File

./feeds_tamper.inc, line 265
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);
}