You are here

public static function SocialPrivateMessageEntityAutocomplete::validateEntityAutocomplete in Open Social 10.3.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_private_message/src/Element/SocialPrivateMessageEntityAutocomplete.php \Drupal\social_private_message\Element\SocialPrivateMessageEntityAutocomplete::validateEntityAutocomplete()
  2. 8.2 modules/social_features/social_private_message/src/Element/SocialPrivateMessageEntityAutocomplete.php \Drupal\social_private_message\Element\SocialPrivateMessageEntityAutocomplete::validateEntityAutocomplete()
  3. 8.3 modules/social_features/social_private_message/src/Element/SocialPrivateMessageEntityAutocomplete.php \Drupal\social_private_message\Element\SocialPrivateMessageEntityAutocomplete::validateEntityAutocomplete()
  4. 8.4 modules/social_features/social_private_message/src/Element/SocialPrivateMessageEntityAutocomplete.php \Drupal\social_private_message\Element\SocialPrivateMessageEntityAutocomplete::validateEntityAutocomplete()
  5. 8.5 modules/social_features/social_private_message/src/Element/SocialPrivateMessageEntityAutocomplete.php \Drupal\social_private_message\Element\SocialPrivateMessageEntityAutocomplete::validateEntityAutocomplete()
  6. 8.6 modules/social_features/social_private_message/src/Element/SocialPrivateMessageEntityAutocomplete.php \Drupal\social_private_message\Element\SocialPrivateMessageEntityAutocomplete::validateEntityAutocomplete()
  7. 8.7 modules/social_features/social_private_message/src/Element/SocialPrivateMessageEntityAutocomplete.php \Drupal\social_private_message\Element\SocialPrivateMessageEntityAutocomplete::validateEntityAutocomplete()
  8. 8.8 modules/social_features/social_private_message/src/Element/SocialPrivateMessageEntityAutocomplete.php \Drupal\social_private_message\Element\SocialPrivateMessageEntityAutocomplete::validateEntityAutocomplete()
  9. 10.0.x modules/social_features/social_private_message/src/Element/SocialPrivateMessageEntityAutocomplete.php \Drupal\social_private_message\Element\SocialPrivateMessageEntityAutocomplete::validateEntityAutocomplete()
  10. 10.1.x modules/social_features/social_private_message/src/Element/SocialPrivateMessageEntityAutocomplete.php \Drupal\social_private_message\Element\SocialPrivateMessageEntityAutocomplete::validateEntityAutocomplete()
  11. 10.2.x modules/social_features/social_private_message/src/Element/SocialPrivateMessageEntityAutocomplete.php \Drupal\social_private_message\Element\SocialPrivateMessageEntityAutocomplete::validateEntityAutocomplete()

Form element validation handler for entity_autocomplete elements.

Overrides EntityAutocomplete::validateEntityAutocomplete

File

modules/social_features/social_private_message/src/Element/SocialPrivateMessageEntityAutocomplete.php, line 21

Class

SocialPrivateMessageEntityAutocomplete
Provides an private message member autocomplete form element.

Namespace

Drupal\social_private_message\Element

Code

public static function validateEntityAutocomplete(array &$element, FormStateInterface $form_state, array &$complete_form) {
  parent::validateEntityAutocomplete($element, $form_state, $complete_form);
  $value = $form_state
    ->getValue('members');
  $form_state
    ->setValue('members', $value['target_id']);
}