function config_perms_generate_machine_name in Custom Permissions 7.2
Same name and namespace in other branches
- 6.2 config_perms.module \config_perms_generate_machine_name()
Generate a machine name given a string
2 calls to config_perms_generate_machine_name()
- config_perms_admin_form_validate in ./
config_perms.admin.inc - Validate handler.
- config_perms_save in ./
config_perms.module - Inserts or updates a perm into the database.
File
- ./
config_perms.module, line 209 - Allows additional permissions to be created and managed through a administration form
Code
function config_perms_generate_machine_name($string) {
return strtolower(preg_replace('/[^a-zA-Z0-9_]+/', '_', $string));
}