You are here

public function DataPolicyConsentManagerInterface::saveConsent in Data Policy 8

Save user consent.

Parameters

int $user_id: The user ID.

string $action: The action (submit and etc.)

array $values: Array of user consent values to process saveConsent:

  • state - required option,
  • entity_id - required option,

The one of three allowed states:

  • undecided,
  • not agree,
  • agree.
1 method overrides DataPolicyConsentManagerInterface::saveConsent()
DataPolicyConsentManager::saveConsent in src/DataPolicyConsentManager.php
Save user consent.

File

src/DataPolicyConsentManagerInterface.php, line 44

Class

DataPolicyConsentManagerInterface
Defines the Data Policy Consent Manager service interface.

Namespace

Drupal\data_policy

Code

public function saveConsent($user_id, $action = NULL, $values = [
  'state' => UserConsentInterface::STATE_UNDECIDED,
]);