function social_tagging_to_machine_name in Open Social 8.7
Same name and namespace in other branches
- 8.9 modules/social_features/social_tagging/social_tagging.module \social_tagging_to_machine_name()
- 8 modules/social_features/social_tagging/social_tagging.module \social_tagging_to_machine_name()
- 8.2 modules/social_features/social_tagging/social_tagging.module \social_tagging_to_machine_name()
- 8.3 modules/social_features/social_tagging/social_tagging.module \social_tagging_to_machine_name()
- 8.4 modules/social_features/social_tagging/social_tagging.module \social_tagging_to_machine_name()
- 8.5 modules/social_features/social_tagging/social_tagging.module \social_tagging_to_machine_name()
- 8.6 modules/social_features/social_tagging/social_tagging.module \social_tagging_to_machine_name()
- 8.8 modules/social_features/social_tagging/social_tagging.module \social_tagging_to_machine_name()
- 10.3.x modules/social_features/social_tagging/social_tagging.module \social_tagging_to_machine_name()
- 10.0.x modules/social_features/social_tagging/social_tagging.module \social_tagging_to_machine_name()
- 10.1.x modules/social_features/social_tagging/social_tagging.module \social_tagging_to_machine_name()
- 10.2.x modules/social_features/social_tagging/social_tagging.module \social_tagging_to_machine_name()
Main term names to machine name for on node edit / validate.
Parameters
string $text: A node.
Return value
mixed|string A machine name so it can be used pogrammatically.
5 calls to social_tagging_to_machine_name()
- SocialTaggingOverrides::loadOverrides in modules/
social_features/ social_tagging/ src/ SocialTaggingOverrides.php - Returns config overrides.
- SocialTaggingService::buildHierarchy in modules/
social_features/ social_tagging/ src/ SocialTaggingService.php - Returns a multilevel tree.
- social_tagging_form_alter in modules/
social_features/ social_tagging/ social_tagging.module - Implements hook_form_alter().
- social_tagging_form_views_exposed_form_alter in modules/
social_features/ social_tagging/ social_tagging.module - Implements hook_form_FORM_ID_alter().
- _social_tagging_entity_validate in modules/
social_features/ social_tagging/ social_tagging.module - Validate function that overrides the tagging field with new values.
File
- modules/
social_features/ social_tagging/ social_tagging.module, line 438 - Contains social_tagging.module.
Code
function social_tagging_to_machine_name($text) {
$text = strtolower($text);
$text = str_replace(' ', '', $text);
return $text;
}