$activityStatus = CRM_Core_PseudoConstant::activityStatus();
$activityId = 123; $activity = civicrm_api3('Activity', 'getsingle', [ 'id' => $activityId, ]); $activity['status_id'] = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'status_id', 'Completed'); civicrm_api3('Activity', 'create', $activity);This code uses the `CRM_Core_PseudoConstant::getKey()` method to retrieve the integer value for the "Completed" status, and sets it as the new status for the activity with ID 123. In conclusion, CRM_Core_PseudoConstant activityStatus is a part of the CiviCRM library and provides a convenient way to work with activity statuses in a PHP environment. The examples above demonstrate how to use it to retrieve all possible statuses and to set a new status for a specific activity record.