public function ActivityNotifications::changeStatusOfActivity in Open Social 8.6
Same name and namespace in other branches
- 8.9 modules/custom/activity_creator/src/ActivityNotifications.php \Drupal\activity_creator\ActivityNotifications::changeStatusOfActivity()
- 8 modules/custom/activity_creator/src/ActivityNotifications.php \Drupal\activity_creator\ActivityNotifications::changeStatusOfActivity()
- 8.2 modules/custom/activity_creator/src/ActivityNotifications.php \Drupal\activity_creator\ActivityNotifications::changeStatusOfActivity()
- 8.3 modules/custom/activity_creator/src/ActivityNotifications.php \Drupal\activity_creator\ActivityNotifications::changeStatusOfActivity()
- 8.4 modules/custom/activity_creator/src/ActivityNotifications.php \Drupal\activity_creator\ActivityNotifications::changeStatusOfActivity()
- 8.5 modules/custom/activity_creator/src/ActivityNotifications.php \Drupal\activity_creator\ActivityNotifications::changeStatusOfActivity()
- 8.7 modules/custom/activity_creator/src/ActivityNotifications.php \Drupal\activity_creator\ActivityNotifications::changeStatusOfActivity()
- 8.8 modules/custom/activity_creator/src/ActivityNotifications.php \Drupal\activity_creator\ActivityNotifications::changeStatusOfActivity()
- 10.3.x modules/custom/activity_creator/src/ActivityNotifications.php \Drupal\activity_creator\ActivityNotifications::changeStatusOfActivity()
- 10.0.x modules/custom/activity_creator/src/ActivityNotifications.php \Drupal\activity_creator\ActivityNotifications::changeStatusOfActivity()
- 10.1.x modules/custom/activity_creator/src/ActivityNotifications.php \Drupal\activity_creator\ActivityNotifications::changeStatusOfActivity()
- 10.2.x modules/custom/activity_creator/src/ActivityNotifications.php \Drupal\activity_creator\ActivityNotifications::changeStatusOfActivity()
Change the status of an activity.
Parameters
\Drupal\activity_creator\Entity\Activity $activity: Activity object.
int $status: See: activity_creator_field_activity_status_allowed_values().
Return value
\Drupal\activity_creator\Entity\Activity Returns activity object.
3 calls to ActivityNotifications::changeStatusOfActivity()
- ActivityNotifications::markAllNotificationsAsSeen in modules/
custom/ activity_creator/ src/ ActivityNotifications.php - Mark all notifications as Seen for account.
- ActivityNotifications::markEntityAsRead in modules/
custom/ activity_creator/ src/ ActivityNotifications.php - Mark an entity as read for a given account.
- ActivityNotifications::markEntityNotificationsAsRead in modules/
custom/ activity_creator/ src/ ActivityNotifications.php - Mark Notifications as Read for given account and entity..
File
- modules/
custom/ activity_creator/ src/ ActivityNotifications.php, line 124
Class
- ActivityNotifications
- Class ActivityNotifications to get Personalised activity items for account.
Namespace
Drupal\activity_creatorCode
public function changeStatusOfActivity(Activity $activity, $status = ACTIVITY_STATUS_RECEIVED) {
$activity
->set('field_activity_status', $status);
return $activity
->save();
}