private static function UserMailQueueJob::validateQueueItem in Open Social 10.3.x
Same name and namespace in other branches
- 10.1.x modules/social_features/social_user/src/Plugin/AdvancedQueue/JobType/UserMailQueueJob.php \Drupal\social_user\Plugin\AdvancedQueue\JobType\UserMailQueueJob::validateQueueItem()
- 10.2.x modules/social_features/social_user/src/Plugin/AdvancedQueue/JobType/UserMailQueueJob.php \Drupal\social_user\Plugin\AdvancedQueue\JobType\UserMailQueueJob::validateQueueItem()
Validate the queue item data.
Before processing the queue item data we want to check if all the necessary components are available.
Parameters
array $data: The content of the queue item.
Return value
bool True if the item contains all the necessary data.
1 call to UserMailQueueJob::validateQueueItem()
- UserMailQueueJob::process in modules/
social_features/ social_user/ src/ Plugin/ AdvancedQueue/ JobType/ UserMailQueueJob.php
File
- modules/
social_features/ social_user/ src/ Plugin/ AdvancedQueue/ JobType/ UserMailQueueJob.php, line 204
Class
- UserMailQueueJob
- Advanced Queue Job to process email to users.
Namespace
Drupal\social_user\Plugin\AdvancedQueue\JobTypeCode
private static function validateQueueItem(array $data) {
// The queue data must contain the 'mail' key and it should either
// contain 'users' or 'user_mail_addresses'.
return isset($data['mail']) && (isset($data['users']) || isset($data['user_mail_addresses']));
}