private function DataPolicyConsentManager::getStateNumber in Data Policy 8
Get the number of bool state.
Parameters
bool $state: The state value;.
Return value
int
1 call to DataPolicyConsentManager::getStateNumber()
- DataPolicyConsentManager::saveConsent in src/
DataPolicyConsentManager.php - Save user consent.
File
- src/
DataPolicyConsentManager.php, line 319
Class
- DataPolicyConsentManager
- Defines the Data Policy Consent Manager service.
Namespace
Drupal\data_policyCode
private function getStateNumber($state) {
if ($state === TRUE) {
$state = UserConsentInterface::STATE_AGREE;
}
elseif ($state === FALSE) {
$state = UserConsentInterface::STATE_NOT_AGREE;
}
return $state;
}