private function Incident::calculateHash in Radioactivity 4.0.x
Same name and namespace in other branches
- 8.3 src/Incident.php \Drupal\radioactivity\Incident::calculateHash()
- 8.2 src/Incident.php \Drupal\radioactivity\Incident::calculateHash()
Calculate hash for this incident.
Return value
string The calculated hash of this incident.
2 calls to Incident::calculateHash()
- Incident::isValid in src/
Incident.php - Test validity of the Incident.
- Incident::toJson in src/
Incident.php - Convert to JSON format.
File
- src/
Incident.php, line 95
Class
- Incident
- Data class for Radioactivity Incident.
Namespace
Drupal\radioactivityCode
private function calculateHash() {
return sha1(implode('##', [
$this->fieldName,
$this->entityType,
$this->entityId,
$this->targetId,
$this->energy,
Settings::getHashSalt(),
]));
}