public function SocialBulkGroupInvitation::extractEmailsFrom in Open Social 8.9
Same name and namespace in other branches
- 10.3.x modules/social_features/social_group/modules/social_group_invite/src/Form/SocialBulkGroupInvitation.php \Drupal\social_group_invite\Form\SocialBulkGroupInvitation::extractEmailsFrom()
- 10.0.x modules/social_features/social_group/modules/social_group_invite/src/Form/SocialBulkGroupInvitation.php \Drupal\social_group_invite\Form\SocialBulkGroupInvitation::extractEmailsFrom()
- 10.1.x modules/social_features/social_group/modules/social_group_invite/src/Form/SocialBulkGroupInvitation.php \Drupal\social_group_invite\Form\SocialBulkGroupInvitation::extractEmailsFrom()
- 10.2.x modules/social_features/social_group/modules/social_group_invite/src/Form/SocialBulkGroupInvitation.php \Drupal\social_group_invite\Form\SocialBulkGroupInvitation::extractEmailsFrom()
Custom function to extract email addresses from a string.
2 calls to SocialBulkGroupInvitation::extractEmailsFrom()
- SocialBulkGroupInvitation::submitForm in modules/
social_features/ social_group/ modules/ social_group_invite/ src/ Form/ SocialBulkGroupInvitation.php - Custom form submit.
- SocialBulkGroupInvitation::validateForm in modules/
social_features/ social_group/ modules/ social_group_invite/ src/ Form/ SocialBulkGroupInvitation.php - Custom form validation.
File
- modules/
social_features/ social_group/ modules/ social_group_invite/ src/ Form/ SocialBulkGroupInvitation.php, line 432
Class
- SocialBulkGroupInvitation
- Class SocialBulkGroupInvitation.
Namespace
Drupal\social_group_invite\FormCode
public function extractEmailsFrom($string) {
// Remove select2 ID parameter.
$string = str_replace('$ID:', '', $string);
preg_match_all("/[\\._a-zA-Z0-9+-]+@[\\._a-zA-Z0-9+-]+/i", $string, $matches);
return $matches[0];
}