public function FollowContentActivityContext::getRecipients in Open Social 8.6
Same name and namespace in other branches
- 8.9 modules/social_features/social_follow_content/src/Plugin/ActivityContext/FollowContentActivityContext.php \Drupal\social_follow_content\Plugin\ActivityContext\FollowContentActivityContext::getRecipients()
- 8 modules/social_features/social_follow_content/src/Plugin/ActivityContext/FollowContentActivityContext.php \Drupal\social_follow_content\Plugin\ActivityContext\FollowContentActivityContext::getRecipients()
- 8.2 modules/social_features/social_follow_content/src/Plugin/ActivityContext/FollowContentActivityContext.php \Drupal\social_follow_content\Plugin\ActivityContext\FollowContentActivityContext::getRecipients()
- 8.3 modules/social_features/social_follow_content/src/Plugin/ActivityContext/FollowContentActivityContext.php \Drupal\social_follow_content\Plugin\ActivityContext\FollowContentActivityContext::getRecipients()
- 8.4 modules/social_features/social_follow_content/src/Plugin/ActivityContext/FollowContentActivityContext.php \Drupal\social_follow_content\Plugin\ActivityContext\FollowContentActivityContext::getRecipients()
- 8.5 modules/social_features/social_follow_content/src/Plugin/ActivityContext/FollowContentActivityContext.php \Drupal\social_follow_content\Plugin\ActivityContext\FollowContentActivityContext::getRecipients()
- 8.7 modules/social_features/social_follow_content/src/Plugin/ActivityContext/FollowContentActivityContext.php \Drupal\social_follow_content\Plugin\ActivityContext\FollowContentActivityContext::getRecipients()
- 8.8 modules/social_features/social_follow_content/src/Plugin/ActivityContext/FollowContentActivityContext.php \Drupal\social_follow_content\Plugin\ActivityContext\FollowContentActivityContext::getRecipients()
- 10.3.x modules/social_features/social_follow_content/src/Plugin/ActivityContext/FollowContentActivityContext.php \Drupal\social_follow_content\Plugin\ActivityContext\FollowContentActivityContext::getRecipients()
- 10.0.x modules/social_features/social_follow_content/src/Plugin/ActivityContext/FollowContentActivityContext.php \Drupal\social_follow_content\Plugin\ActivityContext\FollowContentActivityContext::getRecipients()
- 10.1.x modules/social_features/social_follow_content/src/Plugin/ActivityContext/FollowContentActivityContext.php \Drupal\social_follow_content\Plugin\ActivityContext\FollowContentActivityContext::getRecipients()
- 10.2.x modules/social_features/social_follow_content/src/Plugin/ActivityContext/FollowContentActivityContext.php \Drupal\social_follow_content\Plugin\ActivityContext\FollowContentActivityContext::getRecipients()
Returns a batched list of recipients for this context.
Format array( array ( id = uid or gip type = "user / group" ) )
Overrides ActivityContextBase::getRecipients
File
- modules/
social_features/ social_follow_content/ src/ Plugin/ ActivityContext/ FollowContentActivityContext.php, line 22
Class
- FollowContentActivityContext
- Provides a 'FollowContentActivityContext' activity context plugin.
Namespace
Drupal\social_follow_content\Plugin\ActivityContextCode
public function getRecipients(array $data, $last_uid, $limit) {
$recipients = [];
// We only know the context if there is a related object.
if (isset($data['related_object']) && !empty($data['related_object'])) {
$related_entity = ActivityFactory::getActivityRelatedEntity($data);
if ($related_entity['target_type'] == 'node') {
$recipients += $this
->getRecipientsWhoFollowContent($related_entity, $data);
}
}
return $recipients;
}