public function EmailFrequencyBase::processItem in Open Social 8.7
Same name and namespace in other branches
- 8.9 modules/custom/activity_send/modules/activity_send_email/src/EmailFrequencyBase.php \Drupal\activity_send_email\EmailFrequencyBase::processItem()
- 8 modules/custom/activity_send/modules/activity_send_email/src/EmailFrequencyBase.php \Drupal\activity_send_email\EmailFrequencyBase::processItem()
- 8.2 modules/custom/activity_send/modules/activity_send_email/src/EmailFrequencyBase.php \Drupal\activity_send_email\EmailFrequencyBase::processItem()
- 8.3 modules/custom/activity_send/modules/activity_send_email/src/EmailFrequencyBase.php \Drupal\activity_send_email\EmailFrequencyBase::processItem()
- 8.4 modules/custom/activity_send/modules/activity_send_email/src/EmailFrequencyBase.php \Drupal\activity_send_email\EmailFrequencyBase::processItem()
- 8.5 modules/custom/activity_send/modules/activity_send_email/src/EmailFrequencyBase.php \Drupal\activity_send_email\EmailFrequencyBase::processItem()
- 8.6 modules/custom/activity_send/modules/activity_send_email/src/EmailFrequencyBase.php \Drupal\activity_send_email\EmailFrequencyBase::processItem()
- 8.8 modules/custom/activity_send/modules/activity_send_email/src/EmailFrequencyBase.php \Drupal\activity_send_email\EmailFrequencyBase::processItem()
- 10.3.x modules/custom/activity_send/modules/activity_send_email/src/EmailFrequencyBase.php \Drupal\activity_send_email\EmailFrequencyBase::processItem()
- 10.0.x modules/custom/activity_send/modules/activity_send_email/src/EmailFrequencyBase.php \Drupal\activity_send_email\EmailFrequencyBase::processItem()
- 10.1.x modules/custom/activity_send/modules/activity_send_email/src/EmailFrequencyBase.php \Drupal\activity_send_email\EmailFrequencyBase::processItem()
- 10.2.x modules/custom/activity_send/modules/activity_send_email/src/EmailFrequencyBase.php \Drupal\activity_send_email\EmailFrequencyBase::processItem()
Processes an activity item.
Parameters
\Drupal\activity_creator\Entity\Activity $activity: The Activity object.
\Drupal\message\Entity\Message $message: The Message object.
\Drupal\user\Entity\User $target: The target user account.
Overrides EmailFrequencyInterface::processItem
2 methods override EmailFrequencyBase::processItem()
- Immediately::processItem in modules/
custom/ activity_send/ modules/ activity_send_email/ src/ Plugin/ EmailFrequency/ Immediately.php - Processes an activity item.
- None::processItem in modules/
custom/ activity_send/ modules/ activity_send_email/ src/ Plugin/ EmailFrequency/ None.php - Processes an activity item.
File
- modules/
custom/ activity_send/ modules/ activity_send_email/ src/ EmailFrequencyBase.php, line 42
Class
- EmailFrequencyBase
- Class EmailFrequencyBase.
Namespace
Drupal\activity_send_emailCode
public function processItem(Activity $activity, Message $message, User $target) {
$db = Database::getConnection();
// Insert incoming activities in our digest table.
$db
->insert('user_activity_digest')
->fields([
'uid',
'activity',
'frequency',
'timestamp',
])
->values([
$target
->id(),
$activity
->id(),
$this->pluginId,
time(),
])
->execute();
}