You are here

public function SocialProfileTagService::tagLabelToMachineName in Open Social 10.3.x

Same name and namespace in other branches
  1. 10.2.x modules/social_features/social_profile/src/SocialProfileTagService.php \Drupal\social_profile\SocialProfileTagService::tagLabelToMachineName()

Returns converted tag name to machine readable.

Parameters

string $label: Label of term.

Return value

string Tag machine name.

Overrides SocialProfileTagServiceInterface::tagLabelToMachineName

File

modules/social_features/social_profile/src/SocialProfileTagService.php, line 150

Class

SocialProfileTagService
Provide a service for profile tagging.

Namespace

Drupal\social_profile

Code

public function tagLabelToMachineName($label) {
  return strtolower(str_replace(' ', '', $label));
}