You are here

public static function SocialProfilePrivacyBatchHelper::finishProcess in Open Social 10.3.x

Same name and namespace in other branches
  1. 10.2.x modules/social_features/social_profile/modules/social_profile_privacy/src/Service/SocialProfilePrivacyBatchHelper.php \Drupal\social_profile_privacy\Service\SocialProfilePrivacyBatchHelper::finishProcess()

Callback for finished batch events.

Parameters

bool $success: TRUE if the update was fully succeeded.

array $results: Contains individual results per operation.

array $operations: Contains the unprocessed operations that failed or weren't touched yet.

File

modules/social_features/social_profile/modules/social_profile_privacy/src/Service/SocialProfilePrivacyBatchHelper.php, line 107

Class

SocialProfilePrivacyBatchHelper
Class SocialProfilePrivacyBatchHelper.

Namespace

Drupal\social_profile_privacy\Service

Code

public static function finishProcess($success, array $results, array $operations) {
  $message = t('Number of profiles affected by batch: @count', [
    '@count' => $results['processed'],
  ]);
  \Drupal::messenger()
    ->addStatus($message);
}